binary
binary copied to clipboard
Efficient, pure binary serialisation using ByteStrings in Haskell.
## Motivation It seems like there are no proper lazy byte parsers in the ecosystem and `binary` is already known to be both bad performance-wise (https://github.com/kolmodin/binary/pull/194) and hacky implementation-wise (https://github.com/kolmodin/binary/issues/136#issuecomment-307424037)....
As perhaps obvious from my other recent tickets I've been looking at how Binary gets compiled as a matter of investigating GHC performance. While looking at the resulting code I...
I noticed that the instances for `Map`, `Set`, `IntMap`, and `IntSet` are "unsafe" in the sense that they will happily build structures that don't obey the expected invariants if they...
* Adds a `Binary (Generically a)` instance. * Updates the documentation.
Hello, While trying to combine `Get` parsers using `asum`, I found out that `instance Alternative Get` is not lawful: `x empty` is not the same as `x` with respect to...
putInt64be doesn't have an INLINE pragma but putWord64be does. Seems like an oversight and not intentional. For consistency the int one should probably just also get a pragma.
Binary defines this instance: ``` -- | @since 0.7.0.0 instance Alternative Get where empty = C $ \inp _ks -> Fail inp "Data.Binary.Get(Alternative).empty" {-# INLINE empty #-} () f g...
Apparently, binary represents a Double as a tuple of (Integer, Int)? This means that doubles suffer a x3 or more size explosion, when really you could just record an IEEE...
Are the build instructions in the README.md outdated? Using GHC-9.2.3 & cabal-install-3.6.2.0, I got package conflict errors at the `cabal configure --enable-tests --enable-benchmarks` on the git tag 0.8.9.0. The master...
Reminder to add an instance for `Generically` (base 4.17) by copying the default definitions ```haskell instance (Generic a, GBinaryPut (Rep a), GBinaryGet (Rep a)) => Binary (Generically a) where put...