z`      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ Portability :"Trevor Elliott <trevor@galois.com>$`aA # is an efficient way to build lazy bs. . There are several functions for constructing s, but only one G to inspect them: to extract any data, you have to turn them into lazy  bs using . Internally, a  constructs a lazy  L.Bytestring by filling byte 9 arrays piece by piece. As each buffer is filled, it is 'popped' 2 off, to become a new chunk of the resulting lazy b. ) All this is hidden from the user of the . cdO(1). The empty Builder, satisfying    = eO(1)., A Builder taking a single byte, satisfying   ( b) = f bO(1).= The concatenation of two Builders, an associative operation  with identity  , satisfying   ( x y) = g ( x) ( y)O(1). A Builder taking a h , satisfying   ( bs) = i [bs]O(1). A Builder taking a lazy b , satisfying   ( bs) = bsO(n). Extract a lazy b from a . D The construction work takes place if and when the relevant part of  the lazy b is demanded. O(1). Pop the h% we have constructed so far, if any, ) yielding a new chunk in the result lazy b. jk'Sequence an IO operation on the buffer lGet the size of the buffer m'Map the resulting list of bytestrings. nEnsure that there are at least n many bytes available. o Ensure that n( many bytes are available, and then use f to write some  bytes into the memory. pqr Ensure that n( many bytes are available, and then use f to write some " storable values into the memory. s $Write a Word16 in big endian format 'Write a Word16 in little endian format $Write a Word32 in big endian format 'Write a Word32 in little endian format $Write a Word64 in big endian format 'Write a Word64 in little endian format O(1).< A Builder taking a single native machine word. The word is = written in host order, host endian form, for the machine you're on. G On a 64 bit machine the Word is an 8 byte value, on a 32 bit machine, 6 4 bytes. Values written this way are not portable to > different endian or word sized machines, without conversion. 9Write a Word16 in native host order and host endianness. % 2 bytes will be written, unaligned. 9Write a Word32 in native host order and host endianness. % 4 bytes will be written, unaligned. %Write a Word64 in native host order. J On a 32 bit machine we write two host order Word32s, in big endian form. % 8 bytes will be written, unaligned. tuv    Portability :"Trevor Elliott <trevor@galois.com>6/The Get monad is an Exception and State monad. wxyz{|}~Run the Get monad applies a }&-based parser on the input ByteString Run the Get monad applies a }-based parser on the input F ByteString. Additional to the result of get it returns the number of + consumed bytes and the rest of the input. JIsolate an action to operating within a fixed block of bytes. The action @ is required to consume all the bytes that it is isolated to.  Skip ahead n bytes. Fails if fewer than n bytes are available.  Skip ahead n bytes. No error if there isn't enough bytes. Run ga*, but return without consuming its input.  Fails if ga fails. Like , but consume the input if gma returns 'Just _'.  Fails if gma fails. Like , but consume the input if gea returns 'Right _'.  Fails if gea fails. Get the next up to n0 bytes as a ByteString, without consuming them. ,Get the number of remaining unparsed bytes. : Useful for checking whether all input has been consumed. . Note that this forces the rest of the input. *Test whether all input has been consumed, - i.e. there are no remaining unparsed bytes.  An efficient }/ method for strict ByteStrings. Fails if fewer  than n bytes are left in the input. !"Pull n/ bytes from the input, as a strict ByteString. #"Read a Word8 from the monad state $#Read a Word16 in big endian format %&Read a Word16 in little endian format &#Read a Word32 in big endian format '&Read a Word32 in little endian format (#Read a Word64 in big endian format )&Read a Word64 in little endian format *O(1).8 Read a single native machine word. The word is read in 2 host order, host endian form, for the machine you're on. On a 64 bit D machine the Word is an 8 byte value, on a 32 bit machine, 4 bytes. +O(1).@ Read a 2 byte Word16 in native host order and host endianness. ,O(1).9 Read a Word32 in native host order and host endianness. -O(1).8 Read a Word64 in native host order and host endianess. ./$Get a list in the following format:  Word64 (big endian format)  element 1  ...  element n 0'Get an IArray in the following format:  index (lower bound)  index (upper bound)  Word64 (big endian format)  element 1  ...  element n 1(Get a sequence in the following format:  Word64 (big endian format)  element 1  ...  element n 2Read as a list of lists. 3,Read as a list of pairs of key and element. 4,Read as a list of pairs of int and element. 5Read as a list of elements. 6Read as a list of ints. 7)Read in a Maybe in the following format: 1 Word8 (0 for Nothing, anything else for Just)  element (when Just) 8)Read an Either, in the following format: / Word8 (0 for Left, anything else for Right) ) element a when 0, element b otherwise & !"#$%&'()*+,-./012345678&"# !$&(%')*+,-./021345678& !"#$%&'()*+,-./012345678 Portability :"Trevor Elliott <trevor@galois.com>&9:=Put merely lifts Builder into a Writer monad, applied to (). ;AThe PutM type. A Writer monad over the efficient Builder monoid. <=>?Run the <: monad @Run the <: monad with a serialiser ARun the <:, monad with a serialiser and get its result BBPop the ByteString we have constructed so far, if any, yielding a % new chunk in the result ByteString. C0Efficiently write a byte into the output buffer DLAn efficient primitive to write a strict ByteString into the output buffer. J It flushes the current buffer, and writes the argument into a new chunk. E?Write a lazy ByteString efficiently, simply appending the lazy ( ByteString chunks to the output buffer F$Write a Word16 in big endian format G'Write a Word16 in little endian format H$Write a Word32 in big endian format I'Write a Word32 in little endian format J$Write a Word64 in big endian format K'Write a Word64 in little endian format LO(1).1 Write a single native machine word. The word is = written in host order, host endian form, for the machine you're on. G On a 64 bit machine the Word is an 8 byte value, on a 32 bit machine, 6 4 bytes. Values written this way are not portable to > different endian or word sized machines, without conversion. MO(1).: Write a Word16 in native host order and host endianness.  For portability issues see  putWordhost. NO(1).: Write a Word32 in native host order and host endianness.  For portability issues see  putWordhost. OO(1).% Write a Word64 in native host order J On a 32 bit machine we write two host order Word32s, in big endian form.  For portability issues see  putWordhost. PQRSTUVWXYZ"9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ":;<=9@A>?BCDEFHJGIKLMNOPQRSTUVWXYZ"9:;<=<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ Portability :"Trevor Elliott <trevor@galois.com>[\!Encode a value in the Put monad. ] Decode a value in the Get monad ^@Encode a value using binary serialisation to a lazy ByteString. _NDecode a value from a lazy ByteString, reconstructing the original structure. #9:C[\]^_ [\]:9C#^_[\]\]^_      !"#$%&'()*+,-./0123456789:;<=>?@?ABCDE FGHIJKLMNOPQRSTUVWXYYZ[\]Z^Z^Z^Z_\Z^`abcdefghijklmnopqrVUstuvwxyz{{|}~ cereal-0.1Data.Serialize.BuilderData.Serialize.GetData.Serialize.PutData.SerializeBuilderempty singletonappendfromByteStringfromLazyByteString toByteStringtoLazyByteStringflush putWord16be putWord16le putWord32be putWord32le putWord64be putWord64le putWordhost putWord16host putWord32host putWord64hostGetrunGet runGetStateisolateskip uncheckedSkip lookAhead lookAheadM lookAheadEuncheckedLookAhead remainingisEmpty getByteString getRemaininggetLazyByteStringgetBytesgetWord8 getWord16be getWord16le getWord32be getWord32le getWord64be getWord64le getWordhost getWord16host getWord32host getWord64hostgetTwoOf getListOf getIArrayOfgetSeqOf getTreeOfgetMapOf getIntMapOfgetSetOf getIntSetOf getMaybeOf getEitherOfPutterPutPutMunPut putBuilderexecPutrunPutrunPutMputWord8 putByteStringputLazyByteStringputTwoOf putListOf putIArrayOfputSeqOf putTreeOfputMapOf putIntMapOfputSetOf putIntSetOf putMaybeOf putEitherOf SerializeputgetencodedecodeBufferbytestring-0.9.1.7Data.ByteString.Lazy.Internal ByteString runBuilderData.ByteString.LazyData.ByteString.Internal fromChunks defaultSize unsafeLiftIOwithSize mapBuilder ensureFreewriteN writeNBuffer newBuffer writeNbyteswriteNBufferBytes shiftr_w16 shiftr_w32 shiftr_w64unGetSuccessFailureTrace formatTracelabelfinalKfailKfailDescgetPtr shiftl_w16 shiftl_w32 shiftl_w64PairSsndStellSmallIntunrollrollbaseGHC.WordWordWord8Word16Word32Word64