tomasz.zielonka: > On Fri, Jan 26, 2007 at 04:31:28PM +0100, Henning Thielemann wrote: > > On Fri, 26 Jan 2007, Donald Bruce Stewart wrote: > > > > > > > > Binary: high performance, pure binary serialisation for Haskell > > > > > > ---------------------------------------------------------------------- > > > > > > The Binary Strike Team is pleased to announce the release of a new, > > > pure, efficient binary serialisation library for Haskell, now available > > > from Hackage: > > > > > > tarball: > > > http://hackage.haskell.org/cgi-bin/hackage-scripts/package/binary/0.2 > > > darcs: darcs get http://darcs.haskell.org/binary > > > haddocks: http://www.cse.unsw.edu.au/~dons/binary/Data-Binary.html > > > > I want to write out data in the machine's endianess, because that data > > will be post-processed by sox, which reads data in the machine's > > endianess. Is this also planned for the package? > > I also have to use a specific serialisation format. I guess we could > both simply use putWord8, but then we'll probably lose most of the > benefits of using the library. > > Perhaps we could think about introducing some "encoding contexts", with > a default encoding that can be automatically derived, but also with the > ability to create one's own encodings?
Note that using Binary directly for non-Haskell structures is a bit like using Read/Show instances for parsing non-Haskell structures: possible, but not optimal. It would be better to use the underlying Get/Put monads available in binary, with the low level support for explicit endian and word sized writes/reads, to build a combinator library on top for these more flexible parsing/binary requirements (like layering Parsec over ReadP or HughesPJ). -- Don _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe