yl      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk Lennart Kolmodin, Ross PatersonBSD3-style (see LICENSE)%Lennart Kolmodin <kolmodin@gmail.com> experimentalportable to Hugs and GHC Trustworthy;A # is an efficient way to build lazy l1s. There are several functions for constructing Xs, but only one to inspect them: to extract any data, you have to turn them into lazy ls using .Internally, a  constructs a lazy   by filling byte arrays piece by piece. As each buffer is filled, it is 'popped' off, to become a new chunk of the resulting lazy l+. All this is hidden from the user of the .O(1). The empty Builder, satisfying   = mO(1).+ A Builder taking a single byte, satisfying  ( b) = n bO(1).L The concatenation of two Builders, an associative operation with identity  , satisfying  ( x y) = o ( x) ( y)O(1). A Builder taking a p , satisfying  ( bs) = q [bs]O(1). A Builder taking a lazy l , satisfying  ( bs) = bsO(n). Extract a lazy l from a P. The construction work takes place if and when the relevant part of the lazy l is demanded.O(1). Pop the pN we have constructed so far, if any, yielding a new chunk in the result lazy l.r&Sequence an IO operation on the buffersGet the size of the buffert&Map the resulting list of bytestrings.uEnsure that there are at least n many bytes available. Ensure that n# bytes are available, and then use f to write at most n bytes into memory. f1 must return the actual number of bytes written.  Ensure that n# bytes are available, and then use f to write exactly n bytes into memory. #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 formatO(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. On a 64 bit machine the Word is an 8 byte value, on a 32 bit machine, 4 bytes. Values written this way are not portable to different endian or word sized machines, without conversion.]Write a Word16 in native host order and host endianness. 2 bytes will be written, unaligned.]Write a Word32 in native host order and host endianness. 4 bytes will be written, unaligned.Write a Word64 in native host order. On a 32 bit machine we write two host order Word32s, in big endian form. 8 bytes will be written, unaligned.'Write a character using UTF-8 encoding.'vwxyzrstu {| }~ $vwxyzrstu {| }~Lennart Kolmodin, Ross PatersonBSD3-style (see LICENSE)%Lennart Kolmodin <kolmodin@gmail.com> experimentalportable to Hugs and GHCSafe  None ;=HKM A decoder produced by running a  monad.The decoder needs to know the current position in the input. Given the number of bytes remaning in the decoder, the outer decoder runner needs to calculate the position and resume the decoding.bThe decoder has successfully finished. Except for the output value you also get the unused input.RThe decoder has consumed the available input and needs more to continue. Provide ! if more input is available and # otherwise, and you will get a new .8The decoder ran into an error. The decoder either used " or was not provided enough input.Run a  monad. See b for what to do next, like providing input, handling decoding errors and to get the output value.Make sure we don't have to pass Nothing to a Partial twice. This way we don't need to pass around an EOF value in the Get monad, it can safely ask several times if it needs to.1Get the total number of bytes read to this point.Isolate a decoder to operate with a fixed number of bytes, and fail if fewer bytes were consumed, or more bytes were attempted to be consumed. If the given decoder fails,  will also fail. Offset from " will be relative to the start of !, not the absolute of the input."WTest whether all input has been consumed, i.e. there are no remaining undecoded bytes.#DEPRECATED. Same as ).qRun a decoder and keep track of all the input it consumes. Once it's finished, return the final decoder (always  or ), and unconsume all the the input the decoder required to run. Any additional chunks which was required to run the decoder will also be returned.$pRun the given decoder, but without consuming its input. If the given decoder fails, then so will this function.%@Run the given decoder, and only consume its input if it returns . If d is returned, the input will be unconsumed. If the given decoder fails, then so will this function.&@Run the given decoder, and only consume its input if it returns . If d is returned, the input will be unconsumed. If the given decoder fails, then so will this function.(LDEPRECATED. Get the number of bytes of remaining input. Note that this is an expensive function to use as in order to calculate how much input remains, all input has to be read and kept in-memory. The decoder keeps the input as a strict bytestring, so you are likely better off by calculating the remaining input in another way.)DAn efficient get method for strict ByteStrings. Fails if fewer than n" bytes are left in the input. If n <= 0# then the empty string is returned.*Get the current chunk.+Replace the current chunk.,Return at least nV bytes, maybe more. If not enough data is available the computation will escape with .-Ensure that there are at least n< bytes available. If not, the computation will escape with ./)The number of bytes that must be consumedThe decoder to isolate !"#$%&'()*+,-. !"#$%&'()*+,-.,. !*+-(#"$%&')) !"#$%&'()*+,-.Lennart Kolmodin, Ross PatersonBSD3-style (see LICENSE)%Lennart Kolmodin <kolmodin@gmail.com> experimentalportable to Hugs and GHCSafe   Lennart KolmodinBSD3-style (see LICENSE)%Lennart Kolmodin <kolmodin@gmail.com> experimentalportable to Hugs and GHC. Trustworthy;HM/An offset, counted in bytes.0 A decoder procuced by running a  monad.1The decoder has successfully finished. Except for the output value you also get any unused input as well as the number of bytes consumed.2RThe decoder has consumed the available input and needs more to continue. Provide ! if more input is available and # otherwise, and you will get a new 0.38The decoder ran into an error. The decoder either used c or was not provided enough input. Contains any unconsumed input and the number of bytes consumed.4Run a  monad. See 0 for what to do next, like providing input, handling decoder errors and to get the output value. Hint: Use the helper functions 8, 9 and :.5RDEPRECATED. Provides compatibility with previous versions of this library. Run a  monad and return a tuple with three values. The first value is the result of the decoder. The second and third are the unused input, and the number of consumed bytes.6Run a  monad and return  on failure and  on success. In both cases any unconsumed input and the number of bytes consumed is returned. In the case of failure, a human-readable error message is included as well.7 The simplest interface to run a 4 decoder. If the decoder runs into an error, calls %, or runs out of input, it will call .8Feed a 0 with more input. If the 0 is 1 or 3 it will add the input to p of unconsumed input.  44 myParser `pushChunk` myInput1 `pushChunk` myInput2 9Feed a 0 with more input. If the 0 is 1 or 3 it will add the input to  ByteString of unconsumed input.  4( myParser `pushChunks` myLazyByteString :Tell a 0* that there is no more input. This passes  to a 22 decoder, otherwise returns the decoder unchanged.; Skip ahead n bytes. Fails if fewer than n bytes are available.<BAn efficient get method for lazy ByteStrings. Fails if fewer than n bytes are left in the input.=Get a lazy ByteString that is terminated with a NUL byte. The returned string does not contain the NUL byte. Fails if it reaches the end of input without finding a NUL.>Get the remaining bytes as a lazy ByteString. Note that this can be an expensive function to use as it forces reading all input and keeping the string in-memory.?!Read a Word8 from the monad state@"Read a Word16 in big endian formatA%Read a Word16 in little endian formatB"Read a Word32 in big endian formatC%Read a Word32 in little endian formatD"Read a Word64 in big endian formatE%Read a Word64 in little endian formatFO(1). Read a single native machine word. The word is read in host order, host endian form, for the machine you're on. On a 64 bit machine the Word is an 8 byte value, on a 32 bit machine, 4 bytes.GO(1).? Read a 2 byte Word16 in native host order and host endianness.HO(1).8 Read a Word32 in native host order and host endianness.IO(1).7 Read a Word64 in native host order and host endianess.,/0123456789:;<=>?@ABCDEFGHI&"#$%&'()/0123456789:;<=>?@ABCDEFGHI&76/0321489:;"$%&')<=>?@BDACEFGHI5(#)/0321456789:;<=>?@ABCDEFGHILennart KolmodinBSD3-style (see LICENSE)%Lennart Kolmodin <kolmodin@gmail.com>stable(Portable to Hugs and GHC. Requires MPTCsSafeJ<Put merely lifts Builder into a Writer monad, applied to ().K@The PutM type. A Writer monad over the efficient Builder monoid.ORun the J monadPRun the J monad with a serialiserQRun the J+ monad with a serialiser and get its resultRfPop the ByteString we have constructed so far, if any, yielding a new chunk in the result ByteString.S/Efficiently write a byte into the output bufferTAn efficient primitive to write a strict ByteString into the output buffer. It flushes the current buffer, and writes the argument into a new chunk.UfWrite a lazy ByteString efficiently, simply appending the lazy ByteString chunks to the output bufferV#Write a Word16 in big endian formatW&Write a Word16 in little endian formatX#Write a Word32 in big endian formatY&Write a Word32 in little endian formatZ#Write a Word64 in big endian format[&Write a Word64 in little endian format\O(1).0 Write a single native machine word. The word is written in host order, host endian form, for the machine you're on. On a 64 bit machine the Word is an 8 byte value, on a 32 bit machine, 4 bytes. Values written this way are not portable to different endian or word sized machines, without conversion.]O(1).V Write a Word16 in native host order and host endianness. For portability issues see  putWordhost.^O(1).V Write a Word32 in native host order and host endianness. For portability issues see  putWordhost._O(1). Write a Word64 in native host order On a 32 bit machine we write two host order Word32s, in big endian form. For portability issues see  putWordhost.JKLMNOPQRSTUVWXYZ[\]^_JKLMNOPQRSTUVWXYZ[\]^_JKLMPQNORSTUVXZWY[\]^_JKLMNOPQRSTUVWXYZ[\]^_ Lennart KolmodinBSD3-style (see LICENSE)%Lennart Kolmodin <kolmodin@gmail.com>unstableFportable to Hugs and GHC. Requires the FFI and some flexible instancesSafe13`The ` class provides a and b:, methods to encode and decode a Haskell value to a lazy l. It mirrors the  and  classes for textual representation of Haskell types, and is suitable for serialising Haskell values to disk, over the network.For decoding and generating simple external binary formats (e.g. C structures), Binary may be used, but in general is not suitable for complex protocols. Instead use the J and  primitives directly.:Instances of Binary should satisfy the following property: decode . encode == id That is, the b and ai methods should be the inverse of each other. A range of instances are provided for basic Haskell types.a Encode a value in the Put monad.bDecode a value in the Get monad'getMany n' get n. elements in order, without blowing the stack.3`abcde`abcde/`abcde Bryan O'SullivanBSD3-style (see LICENSE)%Bryan O'Sullivan <bos@serpentine.com>unstable!Only works with GHC 7.2 and newerSafe 24=JKMLennart KolmodinBSD3-style (see LICENSE)%Lennart Kolmodin <kolmodin@gmail.com>unstableGportable to Hugs and GHC. Requires the FFI and some flexible instances. Trustworthyf?Encode a value using binary serialisation to a lazy ByteString.gMDecode a value from a lazy ByteString, reconstructing the original structure.h1Decode a value from a lazy ByteString. Returning  on failure and  on success. In both cases the unconsumed input and the number of consumed bytes is returned. In case of failure, a human-readable error message will be returned as well.i#Lazily serialise a value to a file.<This is just a convenience function, it's defined simply as: %encodeFile f = B.writeFile f . encode@So for example if you wanted to compress as well, you could use: !B.writeFile f . compress . encodej/Decode a value from a file. In case of errors, ( will be called with the error message.kODecode a value from a file. In case of success, the value will be returned in _. In case of decoder errors, the error message together with the byte offset will be returned.fghijk?JS`abcdefghijk`abcdeJS?fghijkfghijk   !"#$%&'()*+,-./0123456789:;$&'()<=>?@ABCDEFGHIJKLMNOPQRQSTUVWXYZ [ 7 6 \ ] ^_`abcdefgeh eheheigehjklmnoo pqrstuvwxyz{|}{|~{{{{{{      {{{{{{{binary-0.7.6.1Data.Binary.BuilderData.Binary.Builder.InternalData.Binary.Get.InternalData.Binary.GetData.Binary.Put Data.BinaryData.Binary.Builder.BaseL BytestringData.Binary.ClassData.Binary.GenericBuilderempty singletonappendfromByteStringfromLazyByteStringtoLazyByteStringflush writeAtMostwriteN putWord16be putWord16le putWord32be putWord32le putWord64be putWord64le putWordhost putWord16host putWord32host putWord64host putCharUtf8ConsumeGetrunContDecoder BytesReadDonePartialFailrunGetIncremental bytesReadisolatewithInputChunks failOnEOFisEmptygetBytes lookAhead lookAheadM lookAheadElabel remaining getByteStringgetputreadNensureN readNWith ByteOffset runGetState runGetOrFailrunGet pushChunk pushChunkspushEndOfInputskipgetLazyByteStringgetLazyByteStringNulgetRemainingLazyByteStringgetWord8 getWord16be getWord16le getWord32be getWord32le getWord64be getWord64le getWordhost getWord16host getWord32host getWord64hostPutPutMunPut putBuilderexecPutrunPutrunPutMputWord8 putByteStringputLazyByteStringBinaryGBinarygputggetencodedecode decodeOrFail encodeFile decodeFiledecodeFileOrFailbytestring-0.10.4.0Data.ByteString.Lazy.Internal ByteStringData.ByteString.LazyData.ByteString.Internal fromChunks withBufferwithSize mapBuilder ensureFreeBuffer runBuilder defaultSize writeBuffer newBufferord2ord3ord4 shiftr_w16 shiftr_w32 shiftr_w64$fMonoidBuilderbase Data.MaybeJustNothingGHC.Basefail noMeansNorunAndKeepTrack Data.EitherRightLeftSuccessCreturnGbindGfailGapGfmapGpromptprompt'pushBack pushFront unsafeReadN$fAlternativeGet $fShowDecoder$fFunctorDecoder $fFunctorGet$fMonadPlusGet$fApplicativeGet $fMonadGetGHC.ErrerrorcalculateOffset takeHeadChunk dropHeadChunk consumeBytesconsumeUntilNul consumeAll resumeOnEOFgetPtrword16beword16leword32beword32leword64beword64le shiftl_w16 shiftl_w32 shiftl_w64PairSsndStell $fMonadPutM$fApplicativePutM $fFunctorPutMGHC.ReadReadGHC.ShowShowgetManySmallIntunrollroll$fBinaryFingerprint$fBinaryUArray $fBinaryArray $fBinaryTree $fBinaryFloat$fBinaryDouble $fBinarySeq$fBinaryIntMap$fBinaryIntSet $fBinaryMap $fBinarySet$fBinaryByteString$fBinaryByteString0$fBinaryEither $fBinaryMaybe $fBinary[]$fBinary(,,,,,,,,,)$fBinary(,,,,,,,,)$fBinary(,,,,,,,)$fBinary(,,,,,,)$fBinary(,,,,,)$fBinary(,,,,) $fBinary(,,,) $fBinary(,,) $fBinary(,) $fBinaryChar $fBinaryRatio$fBinaryInteger $fBinaryInt $fBinaryWord $fBinaryInt64 $fBinaryInt32 $fBinaryInt16 $fBinaryInt8$fBinaryWord64$fBinaryWord32$fBinaryWord16 $fBinaryWord8$fBinaryOrdering $fBinaryBool $fBinary()TaggedunTaggedSumSizesumSizeGSumgetSumputSum sizeError checkGetSum $fSumSizeM1 $fSumSize:+:$fGSumM1 $fGSum:+: $fGBinary:+: $fGBinaryK1 $fGBinaryM1 $fGBinary:*: $fGBinaryU1 $fGBinaryV1ghc-prim GHC.TypesWordGHC.WordWord8Word16Word32Word64 byteSwap64 byteSwap32 byteSwap16