!:!      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                        Safe1& haskus-binary Bit orderMThe first letter indicates the outer bit ordering, i.e. how bytes are filled:+B?: from left to right (B is for BigEndian).L?: from right to left (L is for LittleEndian)NThe second letter indicates the inner bit ordering, i.e. how words are stored:F?B: the most significant bit is stored first (in the outer bit order!)G?L: the least-significant bit is stored first (in the outer bit order!)3E.g. two successive words of 5 bits: ABCDE, VWXYZ  BB: ABCDEVWX YZxxxxxx   BL: EDCBAZYX WVxxxxxx   LB: XWVEDCBA xxxxxxZY   LL: XYZABCDE xxxxxxVW &)'(*&)'(*None .>HUVX7,0 haskus-binary%Offset obtained when following path p1 haskus-binary#Type obtained when following path p2 haskus-binarySymbol in a layout path4 haskus-binaryIndex in a layout path6 haskus-binaryPath in a layout8 haskus-binaryIndex in the layout path9 haskus-binarySymbol in the layout path -./0123456789 10/67452389.-None.>HIXkGD: haskus-binaryPointer operations; haskus-binary'Cast a pointer from one type to another< haskus-binaryNull pointer (offset is 0)= haskus-binary@Advance a pointer by the given amount of bytes (may be negative)> haskus-binary0Distance between two pointers in bytes (p2 - p1)? haskus-binaryUse the pointer@ haskus-binary Malloc the given number of bytesA haskus-binary$Add offset to the given layout fieldB haskus-binaryBAdd offset corresponding to the layout field with the given symbolC haskus-binaryAAdd offset corresponding to the layout field with the given indexD haskus-binaryA finalized pointerpWe use an offset because we can't modify the pointer directly (it is passed to the foreign pointer destructors)F haskus-binaryNull foreign pointer! haskus-binaryNull finalized pointerG haskus-binaryUse a finalized pointerH haskus-binaryGeneralized version of =I haskus-binaryMalloc a foreign pointerJ haskus-binaryUse a foreign pointerK haskus-binaryFree a malloced memory! :<;@=>?ABCDEFGHIJK:<;@=>?ABCH!KDEGJIF None.FHUVKO haskus-binaryReturn a Int with exactly n bitsP haskus-binaryReturn a Word with exactly n bitsQ haskus-binaryReturn a Int with at least n bitsR haskus-binaryReturn a Word with at least n bitst"#$%&'()*+,-./012345 6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwx"OPQRRQPO    "None .8>HUVXk'S haskus-binaryStorable data-typesECurrently we cannot automatically derive a Storable class with type-level naturals for "alignment" and "sizeOf". Instead we define a Storable class isomorphic to the Foreign.Storable's one but with default methods using DefaultSignatures (i.e., the Storable instance can be automatically derived from a Generic instance).Y haskus-binaryOCompute the required padding between the size sz and b to respect b's alignmentZ haskus-binaryECompute the required padding between a and b to respect b's alignment[ haskus-binaryEA storable data in constant space whose size is known at compile time\ haskus-binary"Size of the stored data (in bytes)] haskus-binary Alignment requirement (in bytes)^ haskus-binary)Peek (read) a value from a memory address_ haskus-binary0Poke (write) a value at the given memory address` haskus-binary)Peek (read) a value from a memory addressa haskus-binary0Poke (write) a value at the given memory addressb haskus-binaryGet statically known sizec haskus-binaryGet statically known alignmentd haskus-binary"Get bytes in host-endianness ordere haskus-binaryPeek a value from a pointerf haskus-binaryPoke a value to a pointerg haskus-binary Generalized Wh haskus-binarySizeOf (for type-application)i haskus-binarySizeOf' (for type-application)j haskus-binary Generalized Vk haskus-binary Alignment (for type-application)l haskus-binary!Alignment' (for type-application)m haskus-binaryPeek with byte offsetn haskus-binaryPoke with byte offseto haskus-binaryPeek with element size offsetp haskus-binaryPoke with element size offsetq haskus-binaryAllocate some bytesr haskus-binaryAllocate some aligned bytess haskus-binarys f executes the computation fo, passing as argument a pointer to a temporarily allocated block of memory sufficient to hold values of type a.The memory is freed when fM terminates (either normally or via an exception), so the pointer passed to f must not be used after this.t haskus-binaryFAllocate a block of memory that is sufficient to hold values of type a6. The size of the area allocated is determined by the W method from the instance of S for the appropriate type.$The memory may be deallocated using K or  finalizerFree when no longer required.u haskus-binaryu val f executes the computation fX, passing as argument a pointer to a temporarily allocated block of memory into which val) has been marshalled (the combination of s and f).The memory is freed when fM terminates (either normally or via an exception), so the pointer passed to f must not be used after this.v haskus-binaryCTemporarily allocate space for the given number of elements (like s, but for multiple elements).w haskus-binary7Allocate space for the given number of elements (like t, but for multiple elements).x haskus-binary~Convert an array of given length into a Haskell list. The implementation is tail-recursive and so uses constant stack space.y haskus-binary/Write the list elements consecutive into memoryz haskus-binary=Temporarily store a list of storable values in memory (like u, but for multiple elements).{ haskus-binaryLike zF, but the action gets the number of values as an additional parameter| haskus-binary Replicates a withXXXJ combinator over a list of objects, yielding a list of marshalled objectsy haskus-binaryGeneralize FS.peekz haskus-binaryGeneralize FS.poke*SWVTUXYZ[]\^_`abcdefghijklmnopqrstuvwxyz{|*[]\^_`aZYXbcdSWVTUefghijklmnopsqrtu|vwz{xy None 8HMVXk haskus-binary Extended EnumGBy default, use fromEnum and toEnum to convert from and to an Integral.But it can be overloaded to perform transformation before using fromEnum/toEnum. E.g. if values are shifted by 1 compared to Enum values, define fromCEnum = (+1) . fromIntegral . fromEnum haskus-binary Store enum a as a b haskus-binaryRead an enum field haskus-binaryCreate an enum field haskus-binaryTMake an enum with the last constructor taking a parameter for the rest of the range data T = A | B | C | D Word8 makeEnumWithCustom :: Int -> T makeEnumWithCustom x = case x of 0 -> A 1 -> B 2 -> C n -> D (n - 3)  haskus-binaryzMake an enum with the last constructor taking a parameter for the rest of the range, but don't build the last constructor data T = A | B | C | D Word8 makeEnumMaybe :: Int -> T makeEnumMaybe x = case x of 0 -> Just A 1 -> Just B 2 -> Just C n -> Nothing  haskus-binary&Make an enum from a number (0 indexed) NoneM haskus-binary8-bit character (ASCII, etc.) NoneF] haskus-binarySigned bit shiftsSigned means that the sign bit (the higher order bit): - propagates to the right during right shifts and - keeps its value during left shifts (except when all other bits are 0)Checked means that there is an additional test to ensure that the shift offset is valid (less than the bit count). If you are sure that the offset is valid, use the "unchecked" version which should be faster. haskus-binaryChecked signed right shift haskus-binaryChecked signed left shift haskus-binaryUnchecked signed right shift haskus-binaryUnchecked signed left shift haskus-binaryFChecked signed shift to the left if positive, to the right if negative haskus-binaryHUnchecked signed shift to the left if positive, to the right if negative haskus-binary Bit shiftsChecked means that there is an additional test to ensure that the shift offset is valid (less than the bit count). If you are sure that the offset is valid, use the "unchecked" version which should be faster.To shift signed numbers, see  class methods. haskus-binaryChecked right shift haskus-binaryChecked left shift haskus-binaryUnchecked right shift haskus-binaryUnchecked left shift haskus-binary?Checked shift to the left if positive, to the right if negative haskus-binaryAUnchecked shift to the left if positive, to the right if negative NoneFa haskus-binaryBitwise bit operations haskus-binary Bitwise "and" haskus-binary Bitwise "or" haskus-binary Bitwise "xor" haskus-binary Complement None8F haskus-binaryType whose bits are indexable haskus-binarybit i is a value with the i$th bit set and all other bits clear. haskus-binary x `setBit` i is the same as  x .|. bit i haskus-binaryx `clearBit` i is the same as x .&. complement (bit i) haskus-binaryx `complementBit` i is the same as  x `xor` bit i haskus-binaryReturn { if the nth bit of the argument is 1 haskus-binaryReturn the number of set bitsNone.8>@FHVXk haskus-binary,Type representable by a fixed amount of bits haskus-binaryNumber of bits haskus-binary%Number of bits (the value is ignored) haskus-binaryAll bits set to 0 haskus-binaryAll bits set to 1 haskus-binary@Count number of zero bits preceding the most significant set bit haskus-binaryACount number of zero bits following the least significant set bitNone8> haskus-binaryTypes whose bits can be rotated haskus-binary*Rotate left if positive, right if negative haskus-binaryChecked left bit rotation haskus-binaryChecked right bit rotation haskus-binary4Unchecked rotate left if positive, right if negative haskus-binaryUnchecked left bit rotation  haskus-binaryUnchecked right bit rotation  None | haskus-binarymemset} haskus-binarymemcpy haskus-binary Copy memory haskus-binary Set memory haskus-binaryAllocate several arrays haskus-binaryPeek several arrays haskus-binaryPoke several arrays haskus-binaryAllocate several arrays haskus-binaryExecute f with a pointer to a or NULLNone.=>?@AHUVXk) haskus-binary An union &We use a list of types as a parameter.The union is just a pointer to a buffer containing the value(s). The size of the buffer is implicitly known from the types in the list. haskus-binary%Retrieve a union member from its type haskus-binary.Create a new union from one of the union types haskus-binaryLike ! but set the remaining bytes to 0~ haskus-binary.Create a new union from one of the union types haskus-binary?Get the union size (i.e. the maximum of the types in the union) haskus-binaryDGet the union alignment (i.e. the maximum of the types in the union)None./=>?@AEHUVXkڃ haskus-binaryReturn type from a field path haskus-binaryReturn offset from a field path haskus-binaryRecord alignment haskus-binary'Record size (with ending padding bytes)& haskus-binary0Get record size without the ending padding bytes' haskus-binaryField( haskus-binaryRecord) haskus-binaryGet record size* haskus-binaryGet record alignment+ haskus-binaryGet a field offset, haskus-binary Get a field- haskus-binary Get a field offset from its path. haskus-binaryGet a field from its path/ haskus-binaryConvert a record into a HList %]%&'()*+,-./ ('&]%%)*,+.-/None@AXk-3 haskus-binaryA buffer5 haskus-binaryDuplicate a buffer6 haskus-binaryBuffer filled with zero7 haskus-binary'Zip two buffers with the given function8 haskus-binary_Unsafe: be careful if you modify the buffer contents or you may break referential transparency9 haskus-binaryTest if the buffer is empty: haskus-binary Empty buffer; haskus-binary Buffer size< haskus-binaryPeek a storable= haskus-binary#Peek a storable at the given offset> haskus-binary(Pop a Storable and return the new buffer? haskus-binary Poke a buffer@ haskus-binaryMapA haskus-binaryReverseB haskus-binaryDrop some bytes O(1)C haskus-binarySplit on the given Byte valuesD haskus-binaryTailE haskus-binaryAppendF haskus-binaryConsG haskus-binarySnocH haskus-binaryInitI haskus-binaryHeadJ haskus-binaryIndexK haskus-binaryUnpackL haskus-binaryUnpackM haskus-binaryTake some bytes O(1)N haskus-binaryTake some bytes O(n)O haskus-binaryTake some bytes O(1)P haskus-binaryPack a ByteStringQ haskus-binaryPack a list of bytesR haskus-binaryPack a StorableS haskus-binaryPack a list of StorableT haskus-binaryPack from a pointer (copy)U haskus-binary#Pack from a pointer (add finalizer)V haskus-binary"Unsafe drop (don't check the size)W haskus-binary"Unsafe take (don't check the size)X haskus-binary"Unsafe tail (don't check the size)Y haskus-binary"Unsafe head (don't check the size)Z haskus-binary"Unsafe last (don't check the size)[ haskus-binary"Unsafe init (don't check the size)\ haskus-binary#Unsafe index (don't check the size)] haskus-binary Map memory^ haskus-binaryUse buffer pointer_ haskus-binary Read file` haskus-binary Write file.3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`.348;9:6@ABDEFGHCIJMNO75<=>?PQRSTKLVWXYZ[\]^U_`NoneA f haskus-binary Execute Putg haskus-binary Put a bufferh haskus-binaryPut a ByteStringi haskus-binaryPut null bytesj haskus-binary5Put null bytes to align the given value to the secondk haskus-binary Put a Word8l haskus-binaryPut a Word16 little-endianm haskus-binaryPut a Word16 big-endiann haskus-binaryPut a Word32 little-endiano haskus-binaryPut a Word32 big-endianp haskus-binaryPut a Word64 little-endianq haskus-binaryPut a Word64 big-endian #fghijklmnopq #fghijklmnopqNoner haskus-binary BufferListt haskus-binaryConvert to a bufferu haskus-binaryConvert from a bufferv haskus-binaryConvert to a lazy ByteStringrstuvrstuvNone1M w haskus-binaryBuffer builderx haskus-binaryEmpty buffer buildery haskus-binaryCreate a Builder denoting the same sequence of bytes as a strict ByteString. The Builder inserts large ByteStrings directly, but copies small ones to ensure that the generated chunks are large on average.z haskus-binary$Encode a single unsigned byte as-is.{ haskus-binaryExecute a Builder and return the generated chunks as a BufferList. The work is performed lazily, i.e., only when a chunk of the BufferList is forced.| haskus-binary>Execute a Builder and return the generated chunks as a Buffer.wxyz{|wx{|yzNone>X(  haskus-binaryData whose bits can be reversed haskus-binaryReverse bits in a Word haskus-binaryObvious recursive version haskus-binary?Reverse bits in a Word8 (3 64-bit operations, modulus division) haskus-binary:Reverse bits in a Word8 (4 64-bit operations, no division) haskus-binary!Reverse bits using a lookup table haskus-binary=Reverse bits in a Word8 (7 no 64-bit operations, no division) haskus-binaryParallel recursive version haskus-binary>Convert a function working on Word8 to one working on any Word6The number of bits in the Word must be a multiple of 8  None,>Xk  haskus-binarymakeMask 3 = 00000111 haskus-binary9Keep only the n least-significant bits of the given value haskus-binary$Compute bit offset (equivalent to x  8 but faster) haskus-binary%Compute byte offset (equivalent to x  8 but faster) haskus-binary Reverse the nH least important bits of the given value. The higher bits are set to 0. haskus-binary'Convert bits into a string composed of '0' and '1' chars haskus-binary=Convert a specified amount of bits into a string composed of '0' and '1' chars haskus-binaryConvert a string of '0' and '1' chars into a word haskus-binaryq`getBitRange bo offset n c` takes n bits at offset in c and put them in the least-significant bits of the result5 5 None.=>?@AHUVX`k-E haskus-binary-Offset of the i-th element in a stored vector haskus-binaryVector with type-checked size haskus-binary$Return the buffer backing the vector haskus-binaryReverse a vector haskus-binaryYield the first n elements haskus-binaryDrop the first n elements haskus-binaryO(1)7 Index safely into the vector using a type level index. haskus-binary>Convert a list into a vector if the number of elements matches haskus-binary0Take at most n element from the list, then use z haskus-binary4Take at most (n-1) element from the list, then use z haskus-binaryConvert a vector into a list haskus-binary&Create a vector by replicating a value haskus-binary(Concat several vectors into a single one haskus-binaryZip two vectors haskus-binarymapNone &'.>HSX`kE haskus-binary Kinded PositgGADT that can be used to ensure at the type level that we deal with non-infinite/non-zero Posit values haskus-binary+Get the kind of the posit at the type level haskus-binaryCheck if a posit is zero haskus-binaryCheck if a posit is infinity haskus-binaryCheck if a posit is positive haskus-binaryCheck if a posit is negative haskus-binaryPosit absolute value haskus-binaryDecode posit fields haskus-binaryConvert a Posit into a Rational haskus-binary-Convert a rational into the approximate Posit haskus-binarycFactor of approximation for a given Rational when encoded as a Posit. The closer to 1, the better.Usage:)positApproxFactor @(Posit 8 2) (52 % 137) haskus-binaryFCompute the decimal error if the given Rational is encoded as a Posit.Usage:)positDecimalError @(Posit 8 2) (52 % 137) haskus-binaryXCompute the number of decimals of accuracy if the given Rational is encoded as a Posit.Usage:,positDecimalAccuracy @(Posit 8 2) (52 % 137) haskus-binaryECompute the binary error if the given Rational is encoded as a Posit.Usage:(positBinaryError @(Posit 8 2) (52 % 137) haskus-binaryTCompute the number of bits of accuracy if the given Rational is encoded as a Posit.Usage:+positBinaryAccuracy @(Posit 8 2) (52 % 137) haskus-binary[Compute the number of bits of accuracy if the given Rational is encoded as a Float/Double.Usage:&floatBinaryAccuracy @Double (52 % 137) haskus-binary Show posit''None8>HMV`7 haskus-binaryBit set indexed with a haskus-binary#Return the bit offset of an element haskus-binary-Return the value associated with a bit offset haskus-binaryPA bit set: use bitwise operations (fast!) and minimal storage (sizeOf basetype)b is the base type (Bits b)a is the element type (Enum a)mThe elements in the Enum a are flags corresponding to each bit of b starting from the least-significant bit. haskus-binaryIndicate if the set is empty haskus-binary Empty bitset haskus-binary%Create a BitSet from a single element haskus-binaryInsert an element in the set haskus-binaryRemove an element from the set haskus-binaryUnwrap the bitset haskus-binary Wrap a bitset haskus-binary Test if an element is in the set haskus-binary Test if an element is in the set haskus-binary$Test if an element is not in the set haskus-binaryRetrieve elements in the set haskus-binaryIntersection of two sets haskus-binaryIntersection of two sets haskus-binaryIntersection of several sets haskus-binaryConvert a list of enum elements into a bitset Warning: b must have enough bits to store the given elements! (we don't perform any check, for performance reason) haskus-binary-Convert a bitset into a list of Enum elements haskus-binaryWConvert a bitset into a list of Enum elements by testing the Enum values successively.The difference with 5 is that extra values in the BitSet will be ignored. haskus-binaryConvert a set into a list haskus-binaryConvert a Foldable into a set haskus-binary3It can be useful to get the indexes of the set bits haskus-binary3It can be useful to get the indexes of the set bitsNone.=>?@AHMUVXkn haskus-binary!Get the whole size of a BitFields haskus-binary$Get the size of a field from it name haskus-binary%Get the type of a field from its name haskus-binary+Get the bit offset of a field from its name haskus-binaryA field of n bits haskus-binaryBit fields on a base type b haskus-binaryGet backing word haskus-binaryGet the value of a field haskus-binary1Get the value of a field (without checking sizes) haskus-binarySet the value of a field haskus-binary1Set the value of a field (without checking sizes)  haskus-binaryModify the value of a field  haskus-binary4Modify the value of a field (without checking sizes)  haskus-binaryGet values in a tuple  haskus-binary%Get field names and values in a tuple haskus-binary%Get field names and values in a tuple haskus-binary%Get field names and values in a tuple        None,.=>?@AHUVXkU1# haskus-binary Add two Unums$ haskus-binary Add two SORNs% haskus-binaryAdd a SORN with itself& haskus-binarySubtract two Unums' haskus-binarySubtract two SORNS( haskus-binarySubtract a SORN with itself/ haskus-binaryUncertainty bit0 haskus-binary Exact number1 haskus-binary#OpenInterval above the exact number4 haskus-binaryBacking word for the unum6 haskus-binary#Compute the number of bits required haskus-binaryAll unum members haskus-binaryIndexable numbers haskus-binaryPositive numbers in the unums7 haskus-binaryCompute the precise numbers set> haskus-binaryAn UnumO0 (and its reciprocal) is always included. Numbers have to be >= 1 and sorted.e.g., Unum '[] =>  0 .. 0 .. 0 Unum '[I 1] => 0 .. -1 .. 0 .. 1 .. 0 Unum '[I 1, I 2] => 0 .. -2 .. -1 .. - 2 .. 0 .. 2 .. 1 .. 2 .. 0 Unum '[I 1, PI] => 0 .. -PI .. -1 .. - PI .. 0 .. PI .. 1 .. PI .. 0? haskus-binary Unum labels@ haskus-binarySize of an unum in bitsA haskus-binaryZeroB haskus-binaryInfiniteD haskus-binaryEncode a numberE haskus-binaryNegate a numberF haskus-binaryReciprocate a numberG haskus-binary Get unum signH haskus-binaryShow SORN bitsI haskus-binarySize of a SORN in bitsJ haskus-binary Empty SORNK haskus-binary Full SORNL haskus-binaryFull SORN without infiniteM haskus-binaryFull SORN without infiniteN haskus-binarySORN singletonO haskus-binaryInsert in a SORNP haskus-binaryRemove in a SORNQ haskus-binaryTest membership in a SORNR haskus-binaryUnion of two SORNsS haskus-binaryIntersection of two SORNsT haskus-binaryComplement the SORNU haskus-binary Negate a SORNV haskus-binaryElements in the SORNW haskus-binaryCreate a SORN from its elementsX haskus-binary*Create a contiguous SORN from two elementsY haskus-binary%Convert a contiguous SORN into a SORNZ haskus-binary!Size of a contiguous SORN in bits[ haskus-binaryShow contiguous SORN bits\ haskus-binaryEmpty contigiuous SORN] haskus-binary#Test if a contigiuous SORN is empty^ haskus-binaryContiguous SORN build_ haskus-binaryFull contiguous SORN` haskus-binaryContiguous SORN singletonA !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`A><=;23:985764/01@ABDCEF?+,-.G)*HIJKLMNOQPRSTUVWX"#$%&'( !Z[Y\]^_`None.1>EHMUVXkn haskus-binaryFixed-point number * w is the backing type * iH is the number of bits for the integer part (before the radix point) * fF is the number of bits for the fractional part (after the radix point)o haskus-binaryConvert to a fixed point valuep haskus-binary Convert from a fixed-point valuenopnopNone>t haskus-binary BitPut monadu haskus-binaryBitPut monad transformerv haskus-binary BitPut statex haskus-binaryBuildery haskus-binary Current bytez haskus-binaryCurrent offset{ haskus-binary Bit order| haskus-binaryCreate a new BitPut state} haskus-binaryPut bits~ haskus-binary Put a Buffer:Examples: 3 bits are already written in the current byte 6 BB: ABCDEFGH IJKLMNOP -> xxxABCDE FGHIJKLM NOPxxxxx  6 LL: ABCDEFGH IJKLMNOP -> LMNOPxxx DEFGHIJK xxxxxABC  6 BL: ABCDEFGH IJKLMNOP -> xxxPONML KJIHGFED CBAxxxxx  6 LB: ABCDEFGH IJKLMNOP -> EDCBAxxx MLKJIHGF xxxxxPON  haskus-binaryFlush the current byte haskus-binaryGet a buffer list haskus-binary Get a Buffer haskus-binaryEvaluate a BitPut monad haskus-binaryEvaluate a BitPut monad haskus-binaryPut bits (monadic) haskus-binaryPut a single bit (monadic) haskus-binaryPut a Buffer (monadic) haskus-binaryChange the current bit orderingBe careful to change the outer bit ordering (B* to L* or the inverse) only on bytes boundaries! Otherwise, you will write the same bits more than once. haskus-binary.Change the bit ordering for the wrapped BitPut<Be careful, this function uses changeBitPutOrder internally.tuvwxyz{|}~vwxyz{|}~tuNone>\ haskus-binary BitGet monad haskus-binaryBitGet monad transformer haskus-binary BitGet state haskus-binaryInput haskus-binaryBit offset (0-7) haskus-binary Bit order haskus-binaryCreate a new BitGetState haskus-binary!Indicate that the source is empty haskus-binary,Skip the given number of bits from the input haskus-binary8Skip the required number of bits to be aligned on 8-bits haskus-binary:Read the given number of bits and put the result in a word haskus-binary*Perform some checks before calling getBitsMCheck that the number of bits to read is not greater than the first parameter haskus-binary:Read the given number of Word8 and return them in a Buffer Examples: 6 BB: xxxABCDE FGHIJKLM NOPxxxxx -> ABCDEFGH IJKLMNOP  6 LL: LMNOPxxx DEFGHIJK xxxxxABC -> ABCDEFGH IJKLMNOP  6 BL: xxxPONML KJIHGFED CBAxxxxx -> ABCDEFGH IJKLMNOP  6 LB: EDCBAxxx MLKJIHGF xxxxxPON -> ABCDEFGH IJKLMNOP  haskus-binaryEvaluate a BitGet monad haskus-binaryEvaluate a BitGet monad haskus-binary3Evaluate a BitGet monad, return the remaining state haskus-binary3Evaluate a BitGet monad, return the remaining state haskus-binaryResume a BitGet evaluation haskus-binaryResume a BitGet evaluation haskus-binary#Indicate if all bits have been read haskus-binary>Skip the given number of bits from the input (monadic version) haskus-binaryJSkip the required number of bits to be aligned on 8-bits (monadic version) haskus-binary:Read the given number of bits and put the result in a word haskus-binary+Perform some checks before calling getBitsM haskus-binary$Get a bit and convert it into a Bool haskus-binaryGet the given number of Word8 haskus-binaryChange the current bit orderingBe careful to change the outer bit ordering (B* to L* or the inverse) only on bytes boundaries! Otherwise, you will read the same bits more than once. haskus-binary.Change the bit ordering for the wrapped BitGet<Be careful, this function uses changeBitGetOrder internally.None_ haskus-binary?Test whether all input *in the current chunk* has been consumed haskus-binaryAGet the number of remaining unparsed bytes *in the current chunk* haskus-binary>Skip ahead n bytes. Fails if fewer than n bytes are available. haskus-binary9Skip ahead n bytes. No error if there isn't enough bytes. haskus-binaryASkip to align n to al. Fails if fewer than n bytes are available. haskus-binaryASkip to align n to al. Fails if fewer than n bytes are available. haskus-binary=Run the getter without consuming its input. Fails if it fails haskus-binaryGRun the getter. Consume its input if Just _ returned. Fails if it fails haskus-binaryHRun the getter. Consume its input if Right _ returned. Fails if it fails haskus-binaryORequire an action to consume exactly the given number of bytes, fail otherwise haskus-binaryORequire an action to consume at most the given number of bytes, fail otherwise haskus-binary(Pull n bytes from the input, as a Buffer haskus-binary Get Word8 haskus-binaryGet Word16 little-endian haskus-binaryGet Word16 big-endian haskus-binaryGet Word32 little-endian haskus-binaryGet Word32 big-endian haskus-binaryGet Word64 little-endian haskus-binaryGet Word64 big-endian haskus-binary4Get while True (read and discard the ending element) haskus-binary.Repeat the getter to read the whole bytestring haskus-binaryGet remaining bytes haskus-binary.Count the number of bytes consumed by a getter haskus-binary9Execute the getter and align on the given number of Word8 haskus-binary(Get Buffer terminated with 0 (consume 0) haskus-binaryRun the Get monad haskus-binary,Run a getter and throw an exception on error haskus-binaryGet bits from a BitGet. .Discard last bits to align on a Word8 boundaryLFIXME: we use a continuation because Data.Serialize.Get doesn't export "put" haskus-binaryApply the getter at most  times haskus-binaryApply the getter at least  times and at most  times$$None> haskus-binary.Get an unsigned word in Little Endian Base 128 haskus-binary.Put an unsigned word in Little Endian Base 128 haskus-binary*Get a signed int in Little Endian Base 128 haskus-binary*Put a signed int in Little Endian Base 128 haskus-binary3Get a bytestring containing a decoded LEB128 string None >HMVXka% haskus-binary/Force a data to be read/stored as little-endian haskus-binary,Force a data to be read/stored as big-endian haskus-binaryReverse bytes in a word haskus-binaryExtended word putters haskus-binary Write a Word8 haskus-binaryWrite a Word16 haskus-binaryWrite a Word32 haskus-binaryWrite a Word64 haskus-binary&Write a Word64 into a native size word haskus-binaryExtended word getters haskus-binary Read a Word8 haskus-binary Read a Word16 haskus-binary Read a Word32 haskus-binary Read a Word64 haskus-binary%Read a native size word into a Word64 haskus-binarySize of a machine word haskus-binary32-bit haskus-binary64-bit haskus-binary Word putters haskus-binary Write a Word8 haskus-binaryWrite a Word16 haskus-binaryWrite a Word32 haskus-binaryWrite a Word64 haskus-binary Word getter haskus-binary Read a Word8 haskus-binary Read a Word16 haskus-binary Read a Word32 haskus-binary Read a Word64 haskus-binary Endianness haskus-binaryLess significant bytes first haskus-binaryMost significant bytes first haskus-binary$Get getters for the given endianness haskus-binary$Get putters for the given endianness haskus-binaryReturn extended getters haskus-binaryReturn extended putters haskus-binary(Detect the endianness of the host memory haskus-binaryDetected host endiannessLTODO: use targetByteOrder in GHC.ByteOrder (should be introduced in GHC 8.4)00!"#!"$%&'%&(!")!"*!"+!",!"-!".!"/!"0!"1!"2!"3!"4!"5!"6%78%9:%9;%9<%9=%9>%9?%9@%9@%AB%AC%AD%&E%&F%&G%&'!HIJKLJMNOPQRSTUVWXYZ[\]^^__``abcdefghijklmmnopqrstuvwxyz{|}~                                 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     N !"#$%&'()*+,-./01234Y567899:;<=>?@ABCDEFGHIJJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                           ! " # $ % & ' ( ) * + , - ./!H0!H1%23%24%25%26%27%28%29%2:!H;!H<%=>%=?%=@%=A%=B%=C%=D%=E%2F%2G%2H%2I%2J%2K%2L%2M%2N%2O%2P%2Q%2R%2S%2T%2U%2V%2W%2X%2Y%2Z%2[%2\%2]%=^%=_%=`%=a%=b%=c%=d%=e%=f%=g%=h%=i%=j%=k%=l%=m%=n%=o%=p%=q%=r%=s%=t%=u!vw!vx!vy!vz!v{!v|!v}!v~!v!v!v!v%2%2%=%=%=%=%=!H%%!v!v(haskus-binary-1.2-9i2CyNkKVP833kw1hNmtcsHaskus.Format.Binary.WordHaskus.Format.Binary.PtrHaskus.Format.Binary.PutHaskus.Format.Binary.GetHaskus.Format.Binary.RecordHaskus.Format.Binary.Bits.OrderHaskus.Format.Binary.LayoutHaskus.Format.Binary.StorableHaskus.Format.Binary.EnumHaskus.Format.Binary.CharHaskus.Format.Binary.Bits.Shift!Haskus.Format.Binary.Bits.BitwiseHaskus.Format.Binary.Bits.Index Haskus.Format.Binary.Bits.Finite Haskus.Format.Binary.Bits.RotateHaskus.Utils.MemoryHaskus.Format.Binary.UnionHaskus.Format.Binary.BufferHaskus.Format.Binary.BufferList"Haskus.Format.Binary.BufferBuilder!Haskus.Format.Binary.Bits.ReverseHaskus.Format.Binary.BitsHaskus.Format.Binary.VectorHaskus.Format.Binary.PositHaskus.Format.Binary.BitSetHaskus.Format.Binary.BitFieldHaskus.Format.Binary.UnumHaskus.Format.Binary.FixedPointHaskus.Format.Binary.Bits.PutHaskus.Format.Binary.Bits.Get#Haskus.Format.Binary.VariableLengthHaskus.Format.Binary.Endiannessghc-primGHC.PrimInt#Word#baseGHC.PtrPtrFunPtr+#-#>#>=#==#<#<=# plusWord# minusWord#gtWord#geWord#eqWord#ltWord#leWord#GHC.ForeignPtr ForeignPtrForeign.C.TypesCShortCUShortCIntCUIntCLongCULongCSize Foreign.Ptr wordPtrToPtr ptrToWordPtrWordPtrcastPtrToFunPtrcastFunPtrToPtr nullFunPtr GHC.TypesisTrue#%cereal-0.5.7.0-K43mhklmeuu242izHkTzmRData.Serialize.PutPutData.Serialize.GetGet/haskus-utils-types-1.3.1-FZISrVbFhHx8KexT7EPBd6Haskus.Utils.TypesModuloBitOrderBBLBBLLL$fShowBitOrder $fEqBitOrder:#>:-> LayoutRootLayoutPathOffsetLayoutPathType LayoutSymbol LayoutIndex LayoutPath layoutIndex layoutSymbolPtrLikecastPtrnullPtrindexPtr ptrDistancewithPtr mallocBytes indexField-->-#> FinalizedPtrnullForeignPtrwithFinalizedPtr indexPtr'mallocForeignPtrByteswithForeignPtrfree$fPtrLikeFinalizedPtr $fPtrLikePtr$fShowFinalizedPtrIntNWordN IntAtLeast WordAtLeastStorablepeekIOpokeIO alignmentsizeOf PaddingExPaddingRequiredPaddingStaticStorableSizeOf Alignment staticPeekIO staticPokeIO staticPeek staticPoke staticSizeOfstaticAlignment wordBytespeekpokesizeOf'sizeOfTsizeOfT' alignment' alignmentT alignmentT' peekByteOff pokeByteOff peekElemOff pokeElemOff allocaBytesallocaBytesAlignedallocamallocwith allocaArray mallocArray peekArray pokeArray withArray withArrayLenwithMany$fStaticStorableInt64$fStaticStorableInt32$fStaticStorableInt16$fStaticStorableInt8$fStaticStorableWord64$fStaticStorableWord32$fStaticStorableWord16$fStaticStorableWord8 $fGStorableM1$fGStorable:*: $fGStorableU1$fStorableWordPtr$fStorableCShort$fStorableCUShort$fStorableCInt$fStorableCUInt$fStorableCLong$fStorableCULong$fStorableCChar$fStorableCSize $fStorablePtr $fStorableInt$fStorableWord$fStorableChar$fStorableDouble$fStorableFloat$fStorableInt64$fStorableInt32$fStorableInt16$fStorableInt8$fStorableWord64$fStorableWord32$fStorableWord16$fStorableWord8 $fGStorableK1CEnum fromCEnumtoCEnum EnumField fromEnumField toEnumFieldmakeEnumWithCustom makeEnumMaybemakeEnum$fStaticStorableEnumField$fShowEnumField $fEqEnumField$fStorableEnumFieldChar8 $fShowChar8 $fEqChar8 $fOrdChar8$fStorableChar8SignedShiftableBits signedShiftR signedShiftLuncheckedSignedShiftRuncheckedSignedShiftL signedShiftuncheckedSignedShift ShiftableBitsshiftRshiftLuncheckedShiftRuncheckedShiftLshiftuncheckedShift$fShiftableBitsInteger$fShiftableBitsInt64$fShiftableBitsInt32$fShiftableBitsInt16$fShiftableBitsInt8$fShiftableBitsInt$fShiftableBitsWord64$fShiftableBitsWord32$fShiftableBitsWord16$fShiftableBitsWord8$fShiftableBitsWord$fSignedShiftableBitsInt64$fSignedShiftableBitsInt32$fSignedShiftableBitsInt16$fSignedShiftableBitsInt8$fSignedShiftableBitsIntBitwise.&..|.xor complement$fBitwiseInteger$fBitwiseInt64$fBitwiseInt32$fBitwiseInt16 $fBitwiseInt8 $fBitwiseInt$fBitwiseWord64$fBitwiseWord32$fBitwiseWord16$fBitwiseWord8 $fBitwiseWord IndexableBitsbitsetBitclearBit complementBittestBitpopCount$fIndexableBitsInt64$fIndexableBitsInt32$fIndexableBitsInt16$fIndexableBitsInt8$fIndexableBitsInt$fIndexableBitsWord64$fIndexableBitsWord32$fIndexableBitsWord16$fIndexableBitsWord8$fIndexableBitsWord FiniteBitsBitSizebitSizezeroBitsoneBitscountLeadingZeroscountTrailingZeros$fFiniteBitsInt64$fFiniteBitsInt32$fFiniteBitsInt16$fFiniteBitsInt8$fFiniteBitsInt$fFiniteBitsWord64$fFiniteBitsWord32$fFiniteBitsWord16$fFiniteBitsWord8$fFiniteBitsWord RotatableBitsrotaterotateLrotateRuncheckedRotateuncheckedRotateLuncheckedRotateR$fRotatableBitsInt64$fRotatableBitsInt32$fRotatableBitsInt16$fRotatableBitsInt8$fRotatableBitsInt$fRotatableBitsWord64$fRotatableBitsWord32$fRotatableBitsWord16$fRotatableBitsWord8$fRotatableBitsWordmemCopymemSet allocaArrays peekArrays pokeArrays withArrayswithMaybeOrNullUnion fromUniontoUnion toUnionZero$fStaticStorableUnion$fApplyFoldSizeOf(,)r$fStorableUnion$fStorableUnion0$fApplyFoldAlignment(,)r $fShowUnionPath RecordSizeFieldRecord recordSizerecordAlignmentrecordFieldOffset recordFieldrecordFieldPathOffsetrecordFieldPath recordToList$fStaticStorableRecord $fShowRecord$fApplyExtract(,)rBuffer bufferDup bufferZero bufferZipWith withBufferPtr isBufferEmpty emptyBuffer bufferSizebufferPeekStorablebufferPeekStorableAtbufferPopStorable bufferPoke bufferMap bufferReverse bufferDrop bufferSplitOn bufferTail bufferAppend bufferCons bufferSnoc bufferInit bufferHead bufferIndexbufferUnpackByteListbufferUnpackByteString bufferTakebufferTakeWhilebufferTakeAtMostbufferPackByteStringbufferPackByteListbufferPackStorablebufferPackStorableList bufferPackPtrbufferUnsafePackPtrbufferUnsafeDropbufferUnsafeTakebufferUnsafeTailbufferUnsafeHeadbufferUnsafeLastbufferUnsafeInitbufferUnsafeIndexbufferUnsafeMapMemorybufferUnsafeUsePtrbufferReadFilebufferWriteFile$fIndexableBitsBuffer$fBitwiseBuffer $fShowBuffer $fEqBuffer $fOrdBufferrunPut putBuffer putByteString putPaddingputPaddingAlignputWord8 putWord16le putWord16be putWord32le putWord32be putWord64le putWord64be BufferListtoBuffer toBufferListtoLazyByteString BufferBuilderemptyBufferBuilder fromBuffer fromWord8$fSemigroupBufferBuilder$fMonoidBufferBuilderReversableBits reverseBitsreverseBitsGenericreverseBitsObviousreverseBits3OpsreverseBits4OpsreverseBitsTablereverseBits7OpsreverseBits5LgNliftReverseBits$fReversableBitsInt$fReversableBitsInt64$fReversableBitsInt32$fReversableBitsInt16$fReversableBitsInt8$fReversableBitsWord$fReversableBitsWord64$fReversableBitsWord32$fReversableBitsWord16$fReversableBitsWord8BitsmakeMask maskLeastBits bitOffset byteOffsetreverseLeastBits bitsToString bitsToStringNbitsFromString getBitRangeVector vectorBuffer vectorReversetakedropindexfromListfromFilledListfromFilledListZtoList replicateconcatzipWith$fRotatableBitsVector$fIndexableBitsVector$fShiftableBitsVector$fFiniteBitsVector$fBitwiseVector $fEqVector$fStorableVector$fStaticStorableVector $fShowVector$fApplyStoreVector(,)r PositEncoding PositInfinity PositZero PositFields positNegativepositRegimeBitCountpositExponentBitCountpositFractionBitCount positRegime positExponent positFractionPositKZeroInfinityValue PositKindZeroK InfinityKNormalKPosit positKindisZero isInfinity isPositive isNegativepositAbs positEncoding positFieldspositToRationalpositFromRationalpositApproxFactorpositDecimalErrorpositDecimalAccuracypositBinaryErrorpositBinaryAccuracyfloatBinaryAccuracy $fShowPosit$fShowPositKind $fEqPositKind$fShowPositFields$fShowPositEncodingCBitSet toBitOffset fromBitOffsetBitSetnullempty singletoninsertdeletetoBitsfromBitsmemberelem notMemberelems intersectionunionunionsfromListToBitstoListFromBitsenumerateSetBits$fIsListBitSet $fCBitSetWord $fCBitSetInt $fShowBitSet $fEqBitSet $fOrdBitSet$fStorableBitSetBitField BitFields bitFieldsBits extractField extractField' updateField updateField' withField withField' matchFieldsmatchNamedFields$fFieldEnumField $fFieldBitSet $fFieldInt64 $fFieldInt32 $fFieldInt16 $fFieldInt8 $fFieldInt $fFieldWord64 $fFieldWord32 $fFieldWord16 $fFieldWord8 $fFieldWord $fFieldBool $fEqBitFields$fShowBitFields$fApplyName(,)r$fStorableBitFields$fStorableBitFieldCSORNSornAddsornAddUsornAdd sornAddDepsornSubUsornSub sornSubDepSORNSORNBackingWordSignPositiveNegativeNoSignUBit ExactNumber OpenIntervalU BackingWordLog2UnumSize UnumNumbersInfiniteRcpNegIUnumNum unumLabelUnum unumLabelsunumSizeunumZero unumInfiniteunumBits unumEncode unumNegateunumReciprocateunumSignsornBitssornSize sornEmptysornFullsornNonInfinite sornNonZero sornSingle sornInsert sornRemove sornMember sornUnion sornIntersectsornComplement sornNegate sornElems sornFromElems sornFromTo csornToSorn csornSize csornBits csornEmpty csornIsEmpty csornFromTo csornFull csornSingle $fUnumNumI $fUnumNumNeg $fUnumNumRcp$fUnumNumUncertain$fApplyGetLabel(,)r$fShowU$fEqU $fShowSORN $fShowCSORN $fShowUBit$fEqUBit $fShowSign$fEqSign FixedPoint toFixedPointfromFixedPoint$fStorableFixedPoint$fShowFixedPoint$fEqFixedPointBitPutBitPutT BitPutStatebitPutStateBuilderbitPutStateCurrentbitPutStateOffsetbitPutStateBitOrdernewBitPutStateputBits putBitsBuffergetBitPutBufferListgetBitPutBuffer runBitPutT runBitPutputBitsM putBitBoolMputBitsBufferMchangeBitPutOrderwithBitPutOrderBitGetBitGetT BitGetStatebitGetStateInputbitGetStateBitOffsetbitGetStateBitOrdernewBitGetStateisEmptyskipBitsskipBitsToAlignOnWord8getBitsgetBitsChecked getBitsBuffer runBitGetT runBitGetrunBitGetPartialTrunBitGetPartialresumeBitGetPartialTresumeBitGetPartialisEmptyM skipBitsMskipBitsToAlignOnWord8MgetBitsMgetBitsCheckedM getBitBoolM getBitsBSMchangeBitGetOrderwithBitGetOrder$fShowBitGetState remainingskip uncheckedSkip skipAlignuncheckedSkipAlign lookAhead lookAheadM lookAheadEconsumeExactly consumeAtMost getBuffergetWord8 getWord16le getWord16be getWord32le getWord32be getWord64le getWord64begetWhilegetWhole getRemaining countBytes alignAfter getBufferNulrunGet runGetOrFail getBitGet getManyAtMostgetManyBounded getULEB128 putULEB128 getSLEB128 putSLEB128getLEB128BufferAsLittleEndian AsBigEndianByteReversable reverseByteshostToBigEndianbigEndianToHosthostToLittleEndianlittleEndianToHostExtendedWordPuttersextwordPutter8extwordPutter16extwordPutter32extwordPutter64extwordPutterNExtendedWordGettersextwordGetter8extwordGetter16extwordGetter32extwordGetter64extwordGetterNWordSize WordSize32 WordSize64 WordPutters wordPutter8 wordPutter16 wordPutter32 wordPutter64 WordGetters wordGetter8 wordGetter16 wordGetter32 wordGetter64 Endianness LittleEndian BigEndiangetWordGettersgetWordPuttersgetExtendedWordGettersgetExtendedWordPuttersgetHostEndiannesshostEndianness$fCEnumEndianness$fByteReversableWord64$fByteReversableWord32$fByteReversableWord16$fByteReversableWord8$fStorableAsBigEndian$fStaticStorableAsBigEndian$fShowAsBigEndian$fStorableAsLittleEndian$fStaticStorableAsLittleEndian$fShowAsLittleEndian$fEqEndianness$fShowEndianness$fEnumEndianness$fShowWordSize $fEqWordSize$fEqAsBigEndian$fOrdAsBigEndian$fEnumAsBigEndian$fNumAsBigEndian$fIntegralAsBigEndian$fRealAsBigEndian$fBitwiseAsBigEndian$fFiniteBitsAsBigEndian$fReversableBitsAsBigEndian$fRotatableBitsAsBigEndian$fShiftableBitsAsBigEndian$fIndexableBitsAsBigEndian$fEqAsLittleEndian$fOrdAsLittleEndian$fEnumAsLittleEndian$fNumAsLittleEndian$fIntegralAsLittleEndian$fRealAsLittleEndian$fBitwiseAsLittleEndian$fFiniteBitsAsLittleEndian$fReversableBitsAsLittleEndian$fRotatableBitsAsLittleEndian$fShiftableBitsAsLittleEndian$fIndexableBitsAsLittleEndiannullFinalizedPtrIntI#GHC.IntInt8I8#Int16I16#Int32I32#Int64I64#WordW#GHC.WordWord8W8#Word16W16#Word32W32#Word64W64#leInt64ltInt64geInt64gtInt64neInt64eqInt64leInt32ltInt32geInt32gtInt32neInt32eqInt32leInt16ltInt16geInt16gtInt16neInt16eqInt16leInt8ltInt8geInt8gtInt8neInt8eqInt8leWord64ltWord64geWord64gtWord64neWord64eqWord64leWord32ltWord32geWord32gtWord32neWord32eqWord32leWord16ltWord16geWord16gtWord16neWord16eqWord16leWord8ltWord8geWord8gtWord8neWord8eqWord8 GHC.ClasseseqWordneWordeqIntneIntgtIntgeIntltIntleIntgtWordgeWordltWordleWorduncheckedIShiftRA64#uncheckedIShiftL64# byteSwap64uncheckedShiftRL64#uncheckedShiftL64# byteSwap32 byteSwap16fsPeekfsPokeTruememsetmemcpytoUnion' unionSizeunionAlignment FieldPathTypeFieldPathOffsetRecordAlignmentFullRecordSizeGHC.Realmoddiv ElemOffsetmap WholeSizeSizeOutputOffsetmatchNamedFields' UnumMembersUnumIndexables UnumPositivesflushIncompletemaxmin