h*       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0.1.1.0(c) Alexey Kuleshevich 2024BSD3(Alexey Kuleshevich  experimental non-portable Safe-InferredcmempackImmutable memory buffer mempackIt is ok to use ByteString withing ST, as long as underlying pointer is never mutated or returned from the supplied action.    (c) Alexey Kuleshevich 2024BSD3(Alexey Kuleshevich  experimental non-portable Safe-Inferred%&)*=q"mempackVery similar interface to  Exceptions-, except not intended for runtime exceptions. !"$#%&'(%&"$# !'((c) Alexey Kuleshevich 2024BSD3(Alexey Kuleshevich  experimental non-portable Safe-Inferred=C!=mempack2This is a helper type that is useful for creating F instances for sum types.@mempackThis is a helper type useful for serializing number of elements in data structures. It uses C underneath, since sizes of common data structures aren't too big. It also prevents negative values from being serialized and deserialized.CmempackVariable length encoding for bounded types. This type of encoding will use less memory for small values, but for larger values it will consume more memory and will be slower during packing/unpacking.FmempackEfficient serialization interface that operates directly on memory buffers.GmempackName of the type that is being deserialized for error reporting. Default implementation relies on .HmempackReport the exact size in number of bytes that packed version of this type will occupy. It is very important to get this right, otherwise I will result in a runtime exception. Another words this is the expected property that it should hold:-packedByteCount a == bufferByteCount (pack a)Imempack/Write binary representation of a type into the  which can be accessed with 1, whenever direct operations on it are necessary.JmempackRead binary representation of the type directly from the buffer, which can be accessed with  when necessary. Direct reads from the buffer should be preceded with advancing the buffer offset with  by the number of bytes that will be consumed from the buffer and making sure that no reads outside of the buffer can happen. Violation of these rules will lead to segfaults.Kmempack8Monad that is used for deserializing data from a memory . It is based on ( that tracks the current index into the  a=, from where the next read suppose to happen. Unpacking can  with  instance or with Q5 that provides a more type safe way of failing using " interface.Nmempack/Monad that is used for serializing data into a . It is based on ( that tracks the current index into the ) where next write is expected to happen.QmempackFailing unpacking with an ".RmempackTail recursive version of  replicateMSmempackThis is the implementation of J for ,  and Tmempack Unpack a  with supplied number of bytes. Similar to S%, except it does not unpack a length.Umempack Increment the offset counter of N monad by then number of H! and return the starting offset.Vmempack Increment the offset counter of K monad by the supplied number of bytes. Returns the original offset or fails with , whenever there is not enough bytes in the .Wmempack"Serialize a type into an unpinned Examples:set -XTypeApplications+unpack @[Int] $ pack ([1,2,3,4,5] :: [Int])Right [1,2,3,4,5]XmempackSerialize a type into a pinned Ymempack"Serialize a type into an unpinned ZmempackSame as W;, but allows controlling the pinnedness of allocated memory[mempack Allocate a  and run the supplied N& action on it. Freezes the allocated # at the end yielding the immutable $ with serialization packed into it.\mempackSame as Z&, but produces a mutable array instead]mempack Allocate a  and run the supplied N action on it.mempackThis is a critical error, therefore we are not gracefully failing this unpacking^mempackHelper function for packing a ' without its length being packed first._mempack Unpack a  of a specified size.`mempackUnpack a memory  into a type using its F instance. Besides the unpacked type it also returns an index into a buffer where unpacked has stopped.mempackThis is a critical error, therefore we are not gracefully failing this unpackingamempackUnpack a memory  into a type using its F instance. Besides potential unpacking failures due to a malformed buffer it will also fail the supplied  was not fully consumed. Use `4, whenever a partially consumed buffer is possible.bmempackSame as a except fails in a  monad, instead of .cmempackSame as b except fails in any  , instead of .dmempackSame as a1 except throws a runtime exception upon a failuremempackDecode a variable length integral value that is encoded with 7 bits of data and the most significant bit (MSB), the 8th bit is set whenever there are more bits following. Continuation style allows us to avoid recursion. Removing loops is good for performance.Zmempack/Should the array be allocated in pinned memory?[mempack/Should the array be allocated in pinned memory?mempackName of the type that is being serialized. Used for error reportingmempack!Size of the array to be allocated\mempack/Should the array be allocated in pinned memory?]mempack/Should the array be allocated in pinned memory?mempackName of the type that is being serialized. Used for error reportingmempack)Size of the mutable array to be allocatedmempack3Packing action to be executed on the mutable buffer_mempacknumber of bytes to unpackmempack/Continuation that will be invoked if MSB is setmempackWill be set either to 0 initially or to the very first unmodified byte, which is guaranteed to have the first bit set.mempack Accumulator3NOPKLMFGHIJWXYZ[\]UVabcd`QST^_CDE@AB=>?gfheRij3NOPKLMFGHIJWXYZ[\]UVabcd`QST^_CDE@AB=>?gfheRij        !!""##$%&''()*+,-./0123456789:;<=>>?@@ABBCDEFGHIIJKKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~&mempack-0.1.1.0-HiR2jKcbgtRDquUFajdTN9 Data.MemPackData.MemPack.BufferData.MemPack.Errormempack$FailT-0.1.2.0-BcGd5i1kT6QJ1PH63yiI77Control.Monad.Trans.FailFailTtransformers-0.6.1.0 Control.Monad.Trans.State.StrictStateT runStateTBufferbufferByteCountbuffernewMutableByteArrayfreezeMutableByteArraywithPtrByteStringSTpinnedByteArrayToByteStringpinnedByteArrayToForeignPtrbyteArrayToShortByteStringbyteArrayFromShortByteString$fBufferByteString$fBufferShortByteString$fBufferByteArrayNotFullyConsumedErrornotFullyConsumedReadnotFullyConsumedAvailablenotFullyConsumedTypeNameRanOutOfBytesErrorranOutOfBytesReadranOutOfBytesAvailableranOutOfBytesRequested UnknownError ManyErrors TextErrorError toSomeError fromSomeError SomeErrorfromMultipleErrors showBytes$fErrorSomeError$fExceptionSomeError$fShowSomeError$fIsStringSomeError$fErrorTextError$fErrorManyErrors$fErrorUnknownError$fErrorRanOutOfBytesError$fShowRanOutOfBytesError$fErrorNotFullyConsumedError$fShowNotFullyConsumedError$fEqNotFullyConsumedError$fOrdNotFullyConsumedError$fEqRanOutOfBytesError$fOrdRanOutOfBytesError$fShowUnknownError$fShowManyErrors $fEqTextError$fShowTextError$fIsStringTextErrorTagunTagLengthunLengthVarLenunVarLenMemPacktypeNamepackedByteCountpackMunpackMUnpack runUnpackPackrunPack failUnpackreplicateTailMunpackByteArrayunpackByteArrayLen packIncrementguardAdvanceUnpackpackpackByteStringpackShortByteString packByteArraypackWithByteArraypackMutableByteArraypackWithMutableByteArraypackByteStringMunpackByteStringMunpackLeftOverunpack unpackFailunpackMonadFail unpackErrorpackedTagByteCount unpackTagMpackTagM unknownTagMlift_#st_$fMonadStateIntPack!$fMonadReaderMutableByteArrayPack $fMonadPack$fApplicativePack $fFunctorPack$fAlternativeUnpack$fMonadStateIntUnpack$fMonadReaderbUnpack$fMonadFailUnpack $fMonadUnpack$fApplicativeUnpack$fFunctorUnpack$fMemPack(,,,,,,)$fMemPack(,,,,,)$fMemPack(,,,,)$fMemPack(,,,) $fMemPack(,,) $fMemPack(,)$fMemPackRatio$fMemPackComplex$fMemPackNatural$fMemPackInteger$fMemPackWord64$fMemPackWord32$fMemPackWord16$fMemPackWord8 $fMemPackWord$fMemPackInt64$fMemPackInt32$fMemPackInt16 $fMemPackInt8 $fMemPackInt$fMemPackStablePtr $fMemPackPtr$fMemPackDouble$fMemPackFloat $fMemPackChar$fMemPackEither$fMemPackMaybe $fMemPackBool $fMemPackVoid $fMemPack()$fMemPackVarLen$fMemPackVarLen0$fMemPackVarLen1$fMemPackVarLen2$fMemPackLength $fEnumLength$fBoundedLength $fMemPackText$fMemPackByteString$fMemPackByteString0$fMemPackShortByteString$fMemPackByteArray $fMemPackList $fMemPackTag$fEqTag$fOrdTag $fShowTag$fNumTag $fEnumTag $fBoundedTag $fEqLength $fShowLength $fNumLength $fEqVarLen $fOrdVarLen $fShowVarLen$fBoundedVarLen $fEnumVarLen $fNumVarLen $fRealVarLen$fIntegralVarLen $fBitsVarLen$fFiniteBitsVarLenbaseData.Typeable.InternalTypeableData.Array.ByteMutableByteArray mtl-2.3.1Control.Monad.Reader.ClassaskControl.Monad.State.Class MonadStateControl.Monad.Failfail MonadFail ByteArraybytestring-0.11.5.2Data.ByteString.Internal.Type ByteStringData.ByteString.Short.InternalShortByteStringerrorFilledBytes errorLeftOverFail Data.EitherEitherunpack7BitVarLen