binary icon indicating copy to clipboard operation
binary copied to clipboard

Efficient, pure binary serialisation using ByteStrings in Haskell.

Results 58 binary issues
Sort by recently updated
recently updated
newest added
trafficstars

Despite the fact that binary was primary designed with lazy bytestrins in mind, it also very useful for generic serialization with various types of buffers. And it works quite well...

The generic bench gets a 22% speedup for encoding and 12% for decoding. GHC 7.10.3.

Here's the file: ``` {-# LANGUAGE DeriveGeneric #-} module Deriv where import GHC.Generics data T = T { f0 :: String, f1 :: String, f2 :: String, f3 :: String,...

I don't know which spelling is more common, but it might be worth using the 'z' spelling in the description somewhere as well, since only cereal shows up if you...

I prefer not to ask for convenience functions willy-nilly, but I think refactoring `decodeFileOrFail` with this signature would be useful: ``` haskell decodeGetFileOrFail :: Get a -> FilePath -> IO...

The data in `Foreign.C.Types` are just newtype wrappers around types which mostly have `Binary` instances already. Is there a reason the C types don't have `Binary` instances?

`Data.Binary` is small enough, and exports names that are unique enough, that it can commonly be simply imported wholesale: ``` import Data.Binary ``` However, this also happens to re-export Data.Word,...

As pointed out in #70 by @ttuegel we don't do validation of UTF-8 when decoding. This needs to be fixed. Consider introducing `getList` in `Binary` if it makes a big...

The IEEE "not-a-number" (NaN) value is not encoded properly, since `encode` uses `decodeFloat`, which is unspecified for NaN (cf. [Prelude](http://hackage.haskell.org/package/base-4.7.0.1/docs/Prelude.html#v:decodeFloat)). Examples: ``` Haskell (0 / 0 :: Double) = NaN...

Would be useful to provide `encode' :: (Binary a) => a -> Data.ByteString.ByteString` Usually I want lazy, but sometimes I do not.