úÎ!>„2ȼ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»NoneD æ   NoneD „  NoneDSX¹ÍN bitstreamClass of diverse types of .'Methods of this class are functions of –s that are either basic functions to implement other ones, or have to preserve their packet/chunk structure for efficiency and strictness behaviour.( bitstreamO(1) The empty .) bitstream(") = (U+2205, EMPTY SET* bitstreamO(1) Convert a ¼ into a .+ bitstreamO(n) Convert a [¼ ] into a ., bitstreamO(n) Convert a  into a [¼].- bitstreamO(n) Explicitly convert a  into a Stream of ¼.« operations are automatically fused whenever it's possible, safe, and effective to do so, but sometimes you may find the rules are too conservative. These two functions - and ., provide a means for coercive stream fusion.#You should be careful when you use -w. Most functions in this package are optimised to minimise frequency of memory allocations and copyings, but getting  s back from Stream ¼ requires the whole 5 to be constructed from scratch. Moreover, for lazy Cs this leads to be an incorrect strictness behaviour because lazy &s are represented as lists of strict  chunks but -J can't preserve the original chunk structure. Let's say you have a lazy  with the following chunks: #bs = [chunk1, chunk2, chunk3, ...] 7and you want to drop the first bit of such stream. Our 9 is only strict on the chunk1' and will produce the following chunks: 9- bs = [chunk0, chunk1', chunk2, chunk3, ...] where chunk0/ is a singleton vector of the first packet of chunk1! whose first bit is dropped, and chunk1'* is a vector of remaining packets of the chunk1 . Neither chunk2 nor chunk30 have to be evaluated here as you might expect.)But think about the following expression: 5import qualified Data.Vector.Fusion.Stream as Stream . $ Stream.tail $ - bs &the resulting chunk structure will be: ![chunk1', chunk2', chunk3', ...] \where each and every chunks are slightly different from the original chunks, and this time chunk1' has the same length as chunk1 but the last bit of chunk1' is from the first bit of chunk2m. This means when you next time apply some functions strict on the first chunk, you end up fully evaluating chunk2 as well as chunk12 and this can be a serious misbehaviour for lazy s.The automatic fusion rules are carefully designed to fire only when there aren't any reason to preserve the original packet / chunk structure.. bitstreamO(n) Convert a  of ¼ into a ./ bitstreamO(n) Convert a ½ into a .0 bitstreamO(n) Convert the lower n bits of the given ¾5. In the case that more bits are requested than the ¾ provides, this acts as if the ¾* has an infinite number of leading 0 bits.1 bitstreamO(n) Convert a  into a ¾.2 bitstreamstrict: O(n), lazy: O(1) 2 is an analogous to (: ) for lists.3 bitstreamO(n) For strict s, 3 is exactly the same as 2.For lazy ones, 3 is strict in the Ò we are consing onto. More precisely, it forces the first chunk to be evaluated. It does this because, for space efficiency, it may coalesce the new bit onto the first chunk rather than starting a new chunk.4 bitstreamO(n) Append a bit to the end of a .5 bitstreamO(n) Append two s.6 bitstream()ú) = 5U+29FA, DOUBLE PLUS7 bitstreamO(1)& Extract the first bit of a non-empty (. An exception will be thrown if empty.8 bitstreamstrict: O(1), lazy: O(n)# Extract the last bit of a finite '. An exception will be thrown if empty.9 bitstreamO(1) Extract the bits after the 7 of a non-empty '. An exception will be thrown if empty.: bitstreamO(n) Return all the bits of a < except the last one. An exception will be thrown if empty.; bitstreamO(1) Test whether a  is empty.< bitstreamstrict: O(1), lazy: O(n) Return the length of a finite .= bitstreamO(n) Map a function over a .> bitstreamO(n) Reverse a .? bitstreamO(n) ?g, applied to a binary operator, a starting value (typically the left-identity of the operator), and a , reduces the 0 using the binary operator, from left to right: ?" f z [x1, x2, ..., xn] == (...((z f x1) f x2) f...) f xn The  must be finite.@ bitstreamO(n) @ is a variant of ?$ that is strict on the accumulator.A bitstreamO(n) A is a variant of ?M that has no starting value argument, and thus must be applied to non-empty s.B bitstreamO(n) A strict version of A.C bitstreamO(n) Ch, applied to a binary operator, a starting value (typically the right-identity of the operator), and a , reduces the 0 using the binary operator, from right to left: C f z [x1, x2, ..., xn] == x1 f (x2 f ... (xn f z)...) D bitstreamO(n) D is a variant of CM that has no starting value argument, and thus must be applied to non-empty s.E bitstreamO(n) Concatenate all s in the list.F bitstreamMap a function over a  and concatenate the results.G bitstreamO(n) G returns the conjunction of a ¼ list. For the result to be ¿, the  must be finite; À, however, results from a À2 value at a finite index of a finite or infinite . Note that strict s are always finite.H bitstreamO(n) H returns the disjunction of a ¼ list. For the result to be À, the  must be finite; ¿, however, results from a ¿2 value at a finite index of a finite or infinite . Note that strict s are always finite.I bitstreamO(n) Applied to a predicate and a , I determines if any bit of the 0 satisfies the predicate. For the result to be À, the  must be finite; ¿, however, results from a ¿U value for the predicate applied to a bit at a finite index of a finite or infinite .J bitstreamO(n) Applied to a predicate and a , J determines if all bits of the . satisfy the predicate. For the result to be ¿, the  must be finite; À, however, results from a ÀU value for the predicate applied to a bit at a finite index of a finite or infinite .K bitstreamO(n) K is similar to ?, but returns a + of successive reduced bits from the left: K f z [x1, x2, ...] == [z, z f x1, (z f x1) f x2, ...]  Note that 8 (K f z xs) == ? f z xs L bitstreamO(n) L is a variant of K& that has no starting value argument: L f [x1, x2, ...] == [x1, x1 f x2, ...] M bitstreamO(n) M is the right-to-left dual of K . Note that 7 (M f z xs) == C f z xs N bitstreamO(n) N is a variant of M& that has no starting value argument.O bitstreamO(n) O n x is a  of length n with x the value of every bit.P bitstreamO(n) The P function is a `dual' to C : while C reduces a  to a summary value, P builds a @ from a seed value. The function takes the element and returns Á if it is done producing the  or returns  (a, b), in which case, a is a prepended to the  and b2 is used as the next element in a recursive call.Q bitstreamO(n) Q is a variant of P but constructs a  with at most n bits.R bitstreamO(n) R n, applied to a  xs, returns the prefix of xs of length n, or xs itself if n > < xs.S bitstreamO(n) S n xs returns the suffix of xs after the first n bits, or ( if n > < xs.T bitstreamO(n) T, applied to a predicate p and a  xs', returns the longest prefix (possibly () of xs of bits that satisfy p.U bitstreamO(n) U p xs% returns the suffix remaining after T p xs.V bitstreamO(n) V, applied to a predicate p and a  xsD, returns a tuple where first element is longest prefix (possibly () of xs of bits that satisfy p- and second element is the remainder of the .V p xs is equivalent to (T p xs, U p xs)W bitstreamO(n) W, applied to a predicate p and a  xsC, returns a tuple where first element is longest prefix (possibly () of xs of bits that do not satisfy p- and second element is the remainder of the .W p is equivalent to V (not . p).X bitstreamO(n) X is the = membership predicate, usually written in infix form, e.g.,  x `elem` xs. For the result to be À, the  must be finite; ¿), however, results from an bit equal to x2 found at a finite index of a finite or infinite .Y bitstream(") = XU+2208, ELEMENT OFZ bitstream(" ) = à (")U+220B, CONTAINS AS MEMBER[ bitstreamO(n) [ is the negation of X.\ bitstream(" ) = [U+2209, NOT AN ELEMENT OF] bitstream(" ) = à (" )"U+220C, DOES NOT CONTAIN AS MEMBER^ bitstreamO(n) The ^" function takes a predicate and a  and returns the bit in the  matching the predicate, or Á if there is no such bit._ bitstreamO(n) _, applied to a predicate and a , returns the * of those bits that satisfy the predicate.` bitstreamO(n) The `# function takes a predicate and a  and returns the pair of Cs of bits which do and do not satisfy the predicate, respectively.a bitstreamO(n) - index (subscript) operator, starting from 0.b bitstreamO(n) The b; function returns the index of the first bit in the given & which is equal to the query bit, or Á if there is no such bit.c bitstreamO(n) The c function extends bT, by returning the indices of all bits equal to the query bit, in ascending order.d bitstreamO(n) The d# function takes a predicate and a 0 and returns the index of the first bit in the  satisfying the predicate, or Á if there is no such bit.e bitstreamO(n) The e function extends dV, by returning the indices of all bits satisfying the predicate, in ascending order.f bitstream O(min(m, n)) f takes two ?s and returns a list of corresponding bit pairs. If one input & is short, excess bits of the longer  are discarded.g bitstreamThe g function takes three /s and returns a list of triples, analogous to f.h bitstreamThe hK function takes four lists and returns a list of quadruples, analogous to f.i bitstreamThe i function takes five 3s and returns a list of five-tuples, analogous to f.j bitstreamThe j function takes six 2s and returns a list of six-tuples, analogous to f.k bitstream O(min(m, n)) k generalises f[ by zipping with the function given as the first argument, instead of a tupling function.l bitstreamThe lH function takes a function which combines three bits, as well as three Ds and returns a list of their point-wise combination, analogous to k.m bitstreamThe mF function takes a function which combines four bits, as well as four Ds and returns a list of their point-wise combination, analogous to k.n bitstreamThe nF function takes a function which combines five bits, as well as five Ds and returns a list of their point-wise combination, analogous to k.o bitstreamThe oD function takes a function which combines six bits, as well as six Ds and returns a list of their point-wise combination, analogous to k.p bitstream O(min(m, n)) p( transforms a list of bit pairs into a  of first components and a  of second components.q bitstreamThe q5 function takes a list of triples and returns three s, analogous to p.r bitstreamThe r7 function takes a list of quadruples and returns four s, analogous to p.s bitstreamThe s8 function takes a list of five-tuples and returns five s, analogous to p.t bitstreamThe t6 function takes a list of six-tuples and returns six s, analogous to p.b !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstb !"#$%&'()*+,/01-.23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst 5565X4Y4Z4[4\4]4a9 None=>?DϦu bitstreamu s are strict s having at most 8 bits.v bitstreamva bitstreams interpret an octet as a vector of bits whose MSB comes first and LSB comes last e.g.B11110000 => [True, True , True , True, False, False, False, False]B10010100 => [True, False, False, True, False, True , False, False]¾ operations (like 1 ) treat a v$ bitstream as a big-endian integer.w bitstreamwa bitstreams interpret an octet as a vector of bits whose LSB comes first and MSB comes last e.g.B11110000 => [False, False, False, False, True, True , True , True]B10010100 => [False, False, True , False, True, False, False, True]¾ operations (like 1 ) treat a w' bitstream as a little-endian integer.x bitstreamO(1) x p == ¿ iff < p == 8, otherwise it returns À.y bitstreamO(1) Convert an octet to u.z bitstreamO(1) z p converts a u p& to an octet, padding with zeroes if < p < 8.{ bitstreamO(1) Change the direction of u from w to v=. Bit directions only affect octet-based operations such as z.| bitstreamO(1) Change the direction of u from v to w=. Bit directions only affect octet-based operations such as z.uvwxyz{|wvuxyz{| None>DÐ<ÄÅÆÇÈÉÊNone =>?DX¯… bitstream&A space-efficient representation of a ¼0 vector, supporting many efficient operations. …s have an idea of  directionsR controlling how octets are interpreted as bits. There are two types of concrete …s: … w and … v.† bitstreamO(n) Convert a strict Ë into a strict ….‡ bitstreamO(n) ‡ bits converts a strict … bits into a strict Ë:. The resulting octets will be padded with zeroes if the < of bs is not multiple of 8.ˆ bitstreamO(n) Convert a Ì of u s into a ….‰ bitstreamO(1) Convert a Ì of u s into a …’, with provided overall bit length. The correctness of the bit length isn't checked, so you MUST be sure your bit length is absolutely correct.Š bitstreamO(1) Convert a … into a Ì of us.‹ bitstreamO(1) Convert a … into a Í of us.Œ bitstreamO(n) Convert a Í of us into …. bitstreamO(n) Convert a … w into a … v=. Bit directions only affect octet-based operations such as ‡.Ž bitstreamO(n) Convert a … v into a … w=. Bit directions only affect octet-based operations such as ‡. bitstreamO(n) Read a …) from the stdin strictly, equivalent to • stdin. The Î. is closed after the contents have been read. bitstreamO(n) Write a … to the stdout, equivalent to ™ stdout.‘ bitstreamThe ‘# function takes a function of type … d -> … dr as its argument. The entire input from the stdin is passed to this function as its argument, and the resulting … is output on the stdout.’ bitstreamO(n)% Read an entire file strictly into a ….“ bitstreamO(n) Write a … to a file.” bitstreamO(n) Append a … to a file.• bitstreamO(n)- Read entire handle contents strictly into a ….ãThis function reads chunks at a time, doubling the chunksize on each read. The final buffer is then realloced to the appropriate size. For files > half of available memory, this may lead to memory exhaustion. Consider using ’ in this case.The ÎK is closed once the contents have been read, or if an exception is thrown.– bitstreamO(n) – h n reads a … directly from the specified Î h. First argument h is the Î to read from, and the second n is the number of octets to read, not bits$. It returns the octets read, up to n#, or null if EOF has been reached.CIf the handle is a pipe or socket, and the writing end is closed, –# will behave as if EOF was reached.— bitstreamO(n) Like –, except that a shorter …f may be returned if there are not enough octets immediately available to satisfy the whole request. —N only blocks if there is no data available, and EOF has not yet been reached.˜ bitstreamO(n) ˜ is similar to –t, except that it will never block waiting for data to become available. If there is no data available to be read, ˜ returns (.™ bitstreamO(n) Write a … to the given Î.œ bitstream… forms Ï# in the same way as ordinary lists: Ð = ( Ñ = 5 Ò = E  bitstream… forms Ó# in the same way as ordinary lists:  '(<>)' = 5 ž bitstream… s are lexicographically ordered. let x = + [¿ , À, À ] y = + [À, ¿ , À ] z = + [À ] in [ Ô x y -- GT , Ô z y -- LT ] c()*+,-./012456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstvw…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™c…wv()*+,ˆ‰Š†‡/01-.‹ŒŽ2456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst‘’“”•–—˜™None =>?DX/¬¡ bitstream&A space-efficient representation of a ¼0 vector, supporting many efficient operations. ¡s have an idea of  directionsR controlling how octets are interpreted as bits. There are two types of concrete ¡s: ¡ w and ¡ v.¢ bitstreamO(n)" Convert a list of chunks, strict …s, into a lazy ¡.£ bitstreamO(n) Convert a lazy ¡ into a list of chunks, strict …s.¤ bitstreamO(n) Convert a lazy Õ into a lazy ¡.¥ bitstreamO(n) ¥ bits converts a lazy ¡ bits into a lazy Õ6. The resulting octets will be padded with zeroes if bs is finite and its < is not multiple of 8.¦ bitstreamO(n) Convert a ¡ w into a ¡ v=. Bit directions only affect octet-based operations such as ¥.§ bitstreamO(n) Convert a ¡ v into a ¡ w=. Bit directions only affect octet-based operations such as ¥.¨ bitstreamO(n) ¨ f x returns an infinite ¡ of repeated applications of f to x: ¨ f x == [x, f x, f (f x), ...] © bitstreamO(n) © x is an infinite ¡, with x the value of every bits.ª bitstreamO(n) ª ties a finite ¡P into a circular one, or equivalently, the infinite repetition of the original ¡". It is the identity on infinite ¡s.« bitstreamO(n) « is equivalent to ± stdin . Will read lazily.¬ bitstreamO(n) Write a ¡ to stdout, equivalent to ´ stdout.­ bitstreamThe ­# function takes a function of type ¡ d -> ¡ dy as its argument. The entire input from the stdin is lazily passed to this function as its argument, and the resulting ¡ is output on the stdout.® bitstreamO(n)# Read an entire file lazily into a ¡.¯ bitstreamO(n) Write a ¡ to a file.° bitstreamO(n) Append a ¡ to a file.± bitstreamO(n) Read entire handle contents lazily into a ¡;. Chunks are read on demand, using the default chunk size.Once EOF is encountered, the Î is closed.² bitstream² h n reads a ¡ directly from the specified Î h. First argument h is the Î to read from, and the second n is the number of octets to read, not bits%. It returns the octets read, up to n#, or null if EOF has been reached.CIf the handle is a pipe or socket, and the writing end is closed, ²# will behave as if EOF was reached.³ bitstreamO(n) ³ is similar to ²}, except that it will never block waiting for data to become available, instead it returns only whatever data is available.´ bitstreamO(n) Write a ¡ to the given Î.· bitstream¡ forms Ï# in the same way as ordinary lists: Ð = ( Ñ = 5 Ò = E ¸ bitstream¡ forms Ó# in the same way as ordinary lists:  '(<>)' = 5 ¹ bitstream¡ s are lexicographically ordered. let x = + [¿ , À, À ] y = + [À, ¿ , À ] z = + [À ] in [ Ô x y -- GT , Ô z y -- LT ] c()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstvw¡¢£¤¥¦§¨©ª«¬­®¯°±²³´c¡wv()*+,¢£¤¥/01-.¦§23456789:;<=>?@ABCDEFGHIJKLMN¨©OªPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst«¬­®¯°±²³´Ö         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£‡ˆŽ¤¥¦‘’“”•–—™š›œžŸ ¡§¨©ª«¬ª«­§¨®§¨¯ª°±ª°²ª³´ µ ¶ · ¸ ¹ º »¼½¾¿ÀÁ¿ÂªÃγŪ³Æª³Çª³Èª³ɧÊ˼̾Í(bitstream-0.3.0.1-38PEI1UOkro6O5Ca9Jd19SData.Bitstream.Fusion.MonadicData.Bitstream.FusionData.Bitstream.GenericData.Bitstream.PacketData.BitstreamData.Bitstream.LazySStreamData.Bitstream.Internal genericLength genericTake genericDrop genericIndexgenericReplicategenericReplicateMgenericUnfoldrNgenericUnfoldrNMgenericFindIndexgenericFindIndexMgenericIndexed Bitstream basicStream basicUnstream basicCons basicCons' basicSnoc basicAppend basicTail basicInitbasicMap basicReverse basicConcat basicScanl basicTake basicDropbasicTakeWhilebasicDropWhile basicFilterbasicPartitionbasicFromNBits basicToBitsempty∅ singletonpackunpackstreamunstreamfromBits fromNBitstoBitsconscons'snocappend⧺headlasttailinitnulllengthmapreversefoldlfoldl'foldl1foldl1'foldrfoldr1concat concatMapandoranyallscanlscanl1scanrscanr1 replicateunfoldrunfoldrNtakedrop takeWhile dropWhilespanbreakelem∈∋notElem∉∌findfilter partition!! elemIndex elemIndices findIndex findIndiceszipzip3zip4zip5zip6zipWithzipWith3zipWith4zipWith5zipWith6unzipunzip3unzip4unzip5unzip6PacketRightLeftfull fromOctettoOctet packetLToR packetRToL$fBitstreamPacket$fBitstreamPacket0 $fOrdPacket $fOrdPacket0 $fShowPacket $fShowPacket0$fStorablePacket $fEqPacketfromByteString toByteString fromPacketsunsafeFromPackets toPackets streamPacketsunstreamPackets directionLToR directionRToL getContentsputBitsinteractreadFile writeFile appendFile hGetContentshGethGetSomehGetNonBlockinghPut$fBitstreamBitstream$fBitstreamBitstream0$fMonoidBitstream$fSemigroupBitstream$fOrdBitstream $fEqBitstream$fShowBitstream fromChunkstoChunksiteraterepeatcycleghc-prim GHC.TypesBoolbase Data.Bits FiniteBitsBitsTrueFalse GHC.MaybeNothingJustGHC.BaseflippackPacketsSize packPacketspacketsFromNBitsSizelePacketsFromNBitsbePacketsFromNBitslePacketsToBitsbePacketsToBitsbytestring-0.10.8.2Data.ByteString.Internal ByteString&vector-0.12.1.2-KSb3nsihfSnCDYOh5IjlsCData.Vector.StorableVector!Data.Vector.Fusion.Stream.MonadicGHC.IO.Handle.TypesHandleMonoidmemptymappendmconcat Semigroup GHC.ClassescompareData.ByteString.Lazy.Internal