pack package:memory
Pack a list of bytes into a bytearray
Deprecated: use fill instead
Pack a list of bytes into a bytearray
Simple Byte Array packer
Simple example:
> flip pack 20 $ putWord8 0x41 >> putByteString "BCD" >> putWord8 0x20 >> putStorable (42 :: Word32)
Right (ABCD *\NUL\NUL\NUL")
Original code from
https://hackage.haskell.org/package/bspack
generalized and adapted to run on
memory, and spellchecked /
tweaked. (2015-05) Copyright (c) 2014 Nicolas DI PRIMA
Un-pack a bytearray into a list of bytes
Un-pack a bytearray into a list of bytes