úÎZðUÔ6      !"#$%&'()*+,-./012345unknown experimental#Vincent Hanquez <vincent@snarc.org> Safe-Inferred6swap endianness on a Word64  56 48 40 32 24 16 8 0  a b c d e f g h  h g f e d c b a 7swap endianness on a Word32 8swap endianness on a Word16 9:678;<=>?@;<=>?@ 9:678;<=>?@unknown experimental#Vincent Hanquez <vincent@snarc.org>None2A Hole represent something that need to be filled 1 later, for example a CRC, a prefixed size, etc. 6They need to be filled before the end of the package, ( otherwise an exception will be raised. =Exception when trying to get bytes out of the memory bounds. APException when trying to finalize the packing monad that still have holes open. =Exception when trying to put bytes out of the memory bounds. Unpacking monad Packing monad BPacking state C1Represent a memory block with a ptr as beginning =Set the new position from the beginning in the memory block. Y This is useful to skip bytes or when using absolute offsets from a header or some such. &Get the position in the memory block. DAllow to look into the memory.  This is inherently unsafe &Get the position in the memory block. E1Put a Hole of a specific size for filling later. Fill a hole with a value BTODO: user can use one hole many times leading to wrong counting. *FAGHIJKBLCMNOPQRSTUVD-callback with current position and byte left WXY E Z[\]^_AGHIJKBLCMRSTUVDY E  FAGHIJKBLCMNOPQRSTUVDWXY E Z[\]^_unknown experimental#Vincent Hanquez <vincent@snarc.org>None 0Run packing on an arbitrary buffer with a size. WThis is available, for example to run on mmap typed memory, and this is highly unsafe, Y as the user need to make sure the pointer and size passed to this function are correct. 2Run unpacking on an arbitrary buffer with a size. WThis is available, for example to run on mmap typed memory, and this is highly unsafe, Y as the user need to make sure the pointer and size passed to this function are correct.  'Pointer to the beginning of the memory Size of the memory Packing action Number of bytes filled The initial block of memory 'Starting offset in the block of memory Size Unpacking action    unknown experimental#Vincent Hanquez <vincent@snarc.org>None CUnpack a bytestring using a monadic unpack action in the IO monad.  Similar to  0 but catch exception and return an Either type. ]Run packing with a buffer created internally with a monadic action and return the bytestring     unknown experimental#Vincent Hanquez <vincent@snarc.org>None)`:Peek and do an action on the result. just for convenience  Skip bytes  Get a Word8 $Get a Word16 in the host endianess. It'7s recommended to use an explicit endianness (LE or BE)  when unserializing format. *Get a Word16 serialized in little endian. 'Get a Word16 serialized in big endian. $Get a Word32 in the host endianess. It'7s recommended to use an explicit endianness (LE or BE)  when unserializing format. *Get a Word32 serialized in little endian. 'Get a Word32 serialized in big endian. $Get a Word64 in the host endianess. It'7s recommended to use an explicit endianness (LE or BE)  when unserializing format. *Get a Word64 serialized in little endian. 'Get a Word64 serialized in big endian. ,Get a number of bytes in bytestring format. RThe original block of memory is expected to live for the life of this bytestring, 9 and this is done so by holding the original ForeignPtr.  Similar to A but copy the bytes to a new bytestring without making reference \ to the original memory after the copy. this allow the original block of memory to go away. Get the remaining bytes. =Get the remaining bytes but copy the bytestring and drop any ' reference from the original function. 2Get a number of bytes until in bytestring format. "this could be made more efficient :Get an arbitrary type with the Storable class constraint. ! Put a Word8 "$Put a Word16 in the host endianess. It'7s recommended to use an explicit endianness (LE or BE)  when serializing format. #*Put a Word16 serialized in little endian. $'Put a Word16 serialized in big endian. %$Put a Word32 in the host endianess. It'7s recommended to use an explicit endianness (LE or BE)  when serializing format. &*Put a Word32 serialized in little endian. ''Put a Word32 serialized in big endian. aPut a Word32 Hole (!Put a Word32 Hole in host endian ) Put a Word32 Hole in big endian *#Put a Word32 Hole in little endian +$Put a Word64 in the host endianess. It'7s recommended to use an explicit endianness (LE or BE)  when serializing format. ,*Put a Word64 serialized in little endian. -'Put a Word64 serialized in big endian. bPut a Word64 Hole .!Put a Word64 Hole in host endian / Put a Word64 Hole in big endian 0#Put a Word64 Hole in little endian 1Put a Bytestring. 2:Put an arbitrary type with the Storable class constraint. 33Unpack a bytestring using a monadic unpack action. 4 Similar to 3G but returns an Either type with an exception type in case of failure. 5]Run packing with a buffer created internally with a monadic action and return the bytestring *c` !"#$%&'a()*+,-b./0123451  !"#$%&'()*+,-./0123451345 !"#$%&'(*)+,-.0/12 *c` !"#$%&'a()*+,-b./012345d      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIE J KFGLMNOPQRSTUVWXYZ[\]^_`ab packer-0.1.1 Data.PackerData.Packer.UnsafeData.Packer.IOData.Packer.EndianData.Packer.InternalHoleOutOfBoundUnpackingOutOfBoundPacking UnpackingPackingunpackSetPositionunpackGetPositionpackGetPositionfillHole runPackingAtrunUnpackingAtrunUnpackingIOtryUnpackingIO runPackingIO unpackSkipgetWord8 getWord16 getWord16LE getWord16BE getWord32 getWord32LE getWord32BE getWord64 getWord64LE getWord64BEgetBytes getBytesCopy getRemaininggetRemainingCopy getBytesWhile getStorableputWord8 putWord16 putWord16LE putWord16BE putWord32 putWord32LE putWord32BE putHoleWord32putHoleWord32BEputHoleWord32LE putWord64 putWord64LE putWord64BE putHoleWord64putHoleWord64BEputHoleWord64LEputBytes putStorable runUnpacking tryUnpacking runPackingswap64swap32swap16shrshlle16Hostle32Hostle64Hostbe16Hostbe32Hostbe64Host HoleInPackingPackStMemoryunpackLookaheadpackHole runUnpacking_ runPacking_ bindUnpacking fmapUnpackingreturnUnpacking apUnpackingunpackUnsafeActRefunpackCheckActRefunpackUnsafeActunpackCheckActunpackGetNbRemainingwithPackMemory modifyHoles packCheckAct$fExceptionOutOfBoundUnpacking$fExceptionHoleInPacking$fExceptionOutOfBoundPacking$fApplicativeUnpacking$fFunctorUnpacking$fMonadUnpackingpeekAndputHoleWord32_putHoleWord64_ unsafeDoIO