Ξυ³h%MΉJvŠ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  €  ‚ ƒ „ …†‡ˆ‰ Α(c) 2010 Simon Meier (c) 2010 Jasper van der JeugtBSD3-style (see LICENSE) https://github.com/blaze-builderstabletested on GHC onlyNoneΐ blaze-builder%A write of a bounded number of bytes.When defining a function write :: a -> Write for some aο, then it is important to ensure that the bound on the number of bytes written is data-independent. Formally, 4 forall x y. getBound (write x) = getBound (write y)ΜThe idea is that this data-independent bound is specified such that the compiler can optimize the check, if there are enough free bytes in the buffer, to a single subtraction between the pointer to the next free byte and the pointer to the end of the buffer with this constant bound of the maximal number of bytes to be written. blaze-builder>Changing a sequence of bytes starting from the given pointer. ξs are the most primitive buffer manipulation. In most cases, you don't use the explicitely but as part of a ;, which also tells how many bytes will be changed at most. blaze-builder Extract the  action of a write.  blaze-builderRun the  action of a write.  blaze-builderΐExtract the maximal number of bytes that this write could write.  blaze-builder†Extract the maximal number of bytes that this write could write in any case. Assumes that the bound of the write is data-independent.  blaze-builder pokeN size io- creates a write that denotes the writing of size( bytes to a buffer using the IO action io . Note that io MUST write EXACTLY size bytes to the buffer!  blaze-builderexactWrite size ioΧ creates a bounded write that can later be converted to a builder that writes exactly size bytes. Note that io MUST write EXACTLY size bytes to the buffer! blaze-builderboundedWrite size write creates a bounded write from a write that does not write more than size bytes. blaze-builderwriteLiftIO io write creates a write executes the io3 action to compute the value that is then written. blaze-builderwriteIf p wTrue wFalse x creates a  with a  equal to wTrue x, if p x and equal to wFalse x# otherwise. The bound of this new ) is the maximum of the bounds for either :. This yields a data independent bound, if the bound for wTrue and wFalse is already data independent. blaze-builderˆCompare the value to a test value and use the first write action for the equal case and the second write action for the non-equal case. blaze-builderΧTODO: Test this. It might well be too difficult to use. FIXME: Better name required! blaze-builder‘A write combinator useful to build decision trees for deciding what value to write with a constant bound on the maximal number of bytes written. blaze-builder'Create a builder that execute a single . blaze-builder Construct a . writing a list of data one element at a time. blaze-builderWrite a storable value. blaze-builderΑA builder that serializes a storable value. No alignment is done. blaze-builderŸA builder that serializes a list of storable values by writing them consecutively. No alignment is done. Parsing information needs to be provided externally.  blaze-builder'Name of caller: for debugging purposes.    (c) 2013 Leon P SmithBSD3 https://github.com/blaze-builderstableNoneN(c) 2013 Leon P SmithBSD3 https://github.com/blaze-builderstableNoneΕ!  blaze-builderWrite a single signed byte.! blaze-builder Write an Š in big endian format." blaze-builder Write an ‹ in big endian format.# blaze-builder Write an Œ in big endian format.$ blaze-builder Write an Š in little endian format.% blaze-builder Write an ‹ in little endian format.& blaze-builder Write an Œ in little endian format.' blaze-builderWrite a single native machine . The α is written in host order, host endian form, for the machine you're on. On a 64 bit machine the ‘ is an 8 byte value, on a 32 bit machine, 4 bytes. Values written this way are not portable to different endian or integer sized machines, without conversion.( blaze-builder Write an Š* in native host order and host endianness.) blaze-builder Write an ‹* in native host order and host endianness.* blaze-builder Write an Œ* in native host order and host endianness.+ blaze-builderSerialize a single byte., blaze-builderSerialize a list of bytes.- blaze-builder Serialize an Š in big endian format.. blaze-builder Serialize an ‹ in big endian format./ blaze-builder Serialize an Œ in big endian format.0 blaze-builderSerialize a list of ‹s in big endian format.1 blaze-builderSerialize a list of Šs in big endian format.2 blaze-builderSerialize a list of Œs in big endian format.3 blaze-builder Serialize an Š in little endian format.4 blaze-builder Serialize an ‹ in little endian format.5 blaze-builder Serialize an Œ in little endian format.6 blaze-builderSerialize a list of Šs in little endian format.7 blaze-builderSerialize a list of ‹s in little endian format.8 blaze-builderSerialize a list of Œs in little endian format.9 blaze-builder"Serialize a single native machine . The ε is serialized in host order, host endian form, for the machine you're on. On a 64 bit machine the   is an 8 byte value, on a 32 bit machine, 4 bytes. Values written this way are not portable to different endian or integer sized machines, without conversion.: blaze-builder Write an Š* in native host order and host endianness.; blaze-builder Write an ‹* in native host order and host endianness.< blaze-builder Write an Œ* in native host order and host endianness.= blaze-builderSerialize a list of s. See 9 for usage considerations.> blaze-builderWrite a list of Š+s in native host order and host endianness.? blaze-builderWrite a list of ‹+s in native host order and host endianness.@ blaze-builderWrite a list of Œ+s in native host order and host endianness.! !"#$%&'()*+,-./0123456789:;<=>?@! !"#$%&'()*+,-./0123456789:;<=>?@(c) 2016 Dylan SimonBSD3 https://github.com/blaze-builderstableNone¨B blaze-builder'Write a HTML escaped byte to a bufffer.C blaze-builderO(1). Serialize a HTML escaped byte.D blaze-builderO(n)). Serialize a HTML escaped list of bytes.E blaze-builderO(n). Serialize a HTML escaped Ž.F blaze-builderO(n) . Serialize a HTML escaped lazy .ABCDEFABCDEF(c) 2013 Leon P SmithBSD3 https://github.com/blaze-builderstableNone 1G blaze-builder2Write the lower 8-bits of a character to a buffer.H blaze-builderO(1),. Serialize the lower 8-bits of a character.I blaze-builderO(n):. Serialize the lower 8-bits of all characters of a stringJ blaze-builderO(n). Serialize a value by Αing it and serializing the lower 8-bits of the resulting string.K blaze-builderO(n)Β. Serialize the lower 8-bits of all characters in the strict text.L blaze-builderO(n)ΐ. Serialize the lower 8-bits of all characters in the lazy text.GHIJKLGHIJKL(c) 2013 Leon P SmithBSD3 https://github.com/blaze-builderstableNone"»M blaze-builder4Write a UTF-8 encoded Unicode character to a buffer.N blaze-builderO(1)9. Serialize a Unicode character using the UTF-8 encoding.O blaze-builderO(n). Serialize a Unicode ‘ using the UTF-8 encoding.P blaze-builderO(n). Serialize a value by )ing it and UTF-8 encoding the resulting ‘.Q blaze-builderO(n). Serialize a strict Unicode ’ value using the UTF-8 encoding.R blaze-builderO(n). Serialize a lazy Unicode “ value using the UTF-8 encoding.MNOPQRMNOPQR(c) 2013 Leon P SmithBSD3 https://github.com/blaze-builderstableNone%ŸS blaze-builderΖWrite a HTML escaped and UTF-8 encoded Unicode character to a bufffer.T blaze-builderO(1).Ζ Serialize a HTML escaped Unicode character using the UTF-8 encoding.U blaze-builderO(n)#. Serialize a HTML escaped Unicode ‘ using the UTF-8 encoding.V blaze-builderO(n). Serialize a value by Αing it and then, HTML escaping and UTF-8 encoding the resulting ‘.W blaze-builderO(n)*. Serialize a HTML escaped strict Unicode ’! value using the UTF-8 encoding.X blaze-builderO(n)#. Serialize a HTML escaped Unicode “ using the UTF-8 encoding. MNOPQRSTUVWXSTUVWX (c) 2013 Leon P SmithBSD3 https://github.com/blaze-builderstableNone. Y blaze-builderWrite a strict Ž to a buffer.Z blaze-builder Create a 2 denoting the same sequence of bytes as a strict Ž. The  inserts large Žάs directly, but copies small ones to ensure that the generated chunks are large on average.[ blaze-builder Construct a  that copies the strict ŽΚs, if it is smaller than the treshold, and inserts it directly otherwise. For example, fromByteStringWith 1024 copies strict ŽŒs whose size is less or equal to 1kb, and inserts them directly otherwise. This implies that the average chunk-size of the generated lazy ϋ may be as low as 513 bytes, as there could always be just a single byte between the directly inserted 1025 byte, strict Žs.\ blaze-builder Construct a  that copies the strict Ž.Use this function to create s from smallish (<= 4kb) Ž's or if you need to guarantee that the Ž1 is not shared with the chunks generated by the .] blaze-builder Construct a  that always inserts the strict Ž directly as a chunk.λThis implies flushing the output buffer, even if it contains just a single byte. You should therefore use ] only for large (> 8kb) Žήs. Otherwise, the generated chunks are too fragmented to be processed efficiently afterwards.^ blaze-builder Create a 0 denoting the same sequence of bytes as a lazy Ž. The " inserts large chunks of the lazy ά directly, but copies small ones to ensure that the generated chunks are large on average._ blaze-builder Construct a ( that uses the thresholding strategy of [ for each chunk of the lazy .` blaze-builder Construct a  that copies the lazy .a blaze-builder Construct a % that inserts all chunks of the lazy  directly.[ blaze-builder Maximal number of bytes to copy. blaze-builderStrict Ž to serialize. blaze-builder Resulting . YZ[\]^_`a YZ[\]^_`a (c) 2013 Simon MeierBSD3 https://github.com/blaze-builderstableNone!Ι/Pb blaze-builderΕTransform a builder such that it uses chunked HTTP transfer encoding.c blaze-builderΝThe zero-length chunk '0rnrn' signaling the termination of the data transfer.bcbc (c) 2013 Leon P SmithBSD3 https://github.com/blaze-builderstableNone:¨!d blaze-builderWrite a single byte.e blaze-builderWrite a ” in big endian format.f blaze-builderWrite a • in big endian format.g blaze-builderWrite a – in big endian format.h blaze-builderWrite a ” in little endian format.i blaze-builderWrite a • in big endian format.j blaze-builderWrite a – in little endian format.k blaze-builderWrite a single native machine —. The —α is written in host order, host endian form, for the machine you're on. On a 64 bit machine the —ž 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.l blaze-builderWrite a ”* in native host order and host endianness.m blaze-builderWrite a •* in native host order and host endianness.n blaze-builderWrite a –* in native host order and host endianness.o blaze-builderSerialize a single byte.p blaze-builderSerialize a list of bytes.q blaze-builder Serialize a ” in big endian format.r blaze-builder Serialize a • in big endian format.s blaze-builder Serialize a – in big endian format.t blaze-builderSerialize a list of •s in big endian format.u blaze-builderSerialize a list of ”s in big endian format.v blaze-builderSerialize a list of –s in big endian format.w blaze-builder Serialize a ” in little endian format.x blaze-builderSerialize a list of •s in little endian format.y blaze-builder Serialize a – in little endian format.z blaze-builderSerialize a list of ”s in little endian format.{ blaze-builderSerialize a list of •s in little endian format.| blaze-builderSerialize a list of –s in little endian format.} blaze-builder"Serialize a single native machine —. The —ε is serialized in host order, host endian form, for the machine you're on. On a 64 bit machine the — 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.~ blaze-builderWrite a ”* in native host order and host endianness. blaze-builderWrite a •* in native host order and host endianness.€ blaze-builderWrite a –* in native host order and host endianness. blaze-builderSerialize a list of —s. See } for usage considerations.‚ blaze-builderWrite a list of ”+s in native host order and host endianness.ƒ blaze-builderWrite a list of •+s in native host order and host endianness.„ blaze-builderWrite a –* in native host order and host endianness.!defghijklmnopqrstuvwxyz{|}~€‚ƒ„!defghijklmnopqrstuvwxyz{|}~€‚ƒ„(c) 2013 Leon P SmithBSD3 https://github.com/blaze-builderstableNoneΠIω… blaze-builderκRun the builder to construct a strict bytestring containing the sequence of bytes denoted by the builder. This is done by first serializing to a lazy bytestring and then packing its chunks to a appropriately sized strict bytestring. ,toByteString = packChunks . toLazyByteString Note that … is a ˜ homomorphism. ξtoByteString mempty == mempty toByteString (x `mappend` y) == toByteString x `mappend` toByteString yΤHowever, in the second equation, the left-hand-side is generally faster to execute.† blaze-buildertoByteStringIOWith bufSize io b runs the builder b% with a buffer of at least the size bufSize and executes the ™ action io whenever the buffer is full. Compared to ˆ™ this function requires less allocation, as the output buffer is only allocated once at the start of the serialization and whenever something bigger than the current buffer size has to be copied into the buffer, which should happen very seldomly for the default buffer size of 32kb. Hence, the pressure on the garbage collector is reduced, which can be an advantage when building long sequences of bytes.ˆ blaze-builderRun a  with the given buffer sizes.&Use this function for integrating the ; type with other libraries that generate lazy bytestrings.‘Note that the builders should guarantee that on average the desired chunk size is attained. Builders may decide to start a new buffer and not completely fill the existing buffer, if this is faster. However, they should not spill too much of the buffer, if they cannot compensate for it.άFIXME: Note that the following paragraphs are not entirely correct as of blaze-builder-0.4:A call 4toLazyByteStringWith bufSize minBufSize firstBufSizeμ will generate a lazy bytestring according to the following strategy. First, we allocate a buffer of size  firstBufSizeΖ and start filling it. If it overflows, we allocate a buffer of size  minBufSizeώ and copy the first buffer to it in order to avoid generating a too small chunk. Finally, every next buffer will be of size bufSize§. This, slow startup strategy is required to achieve good speed for short (<200 bytes) resulting bytestrings, as for them the allocation cost is of a large buffer cannot be compensated. Moreover, this strategy also allows us to avoid spilling too much memory for short resulting bytestrings.Note that setting firstBufSize >= minBufSizeη implies that the first buffer is no longer copied but allocated and filled directly. Hence, setting firstBufSize = bufSize> means that all chunks will use an underlying buffer of size bufSizeΕ. This is recommended, if you know that you always output more than  minBufSize bytes.‰ blaze-builderRun a Write to produce a strict Ž. This is equivalent to (… .  fromWrite)Ν, but is more efficient because it uses just one appropriately-sized buffer.‡ blaze-builderΗBuffer size (upper bounds the number of bytes forced per call to the ™ action). blaze-builder™Η action to execute per full buffer, which is referenced by a strict Ž. blaze-builder to run. blaze-builder Resulting ™ action.ˆ blaze-builder4Buffer size (upper-bounds the resulting chunk size). blaze-builder1This parameter is ignored as of blaze-builder-0.4 blaze-builderΞSize of the first buffer to be used and copied for larger resulting sequences blaze-builderBuilder to run. blaze-builder9Lazy bytestring to output after the builder is finished. blaze-builderResulting lazy bytestringΪ !"#$%&'()*+,-./0123456789:;<=>?@YZ[\]^_`adefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰ˆ…†‡‰š    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYTUVWXYZ[\]^_ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  €  ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ŒŽ‘’“‘’”‘’•–—˜ ™š ›š‘œ‘žŸ ‘’ £’‘€₯‘€¦‘€§–—¨‘ž©–—ͺ«blaze-builder-0.4.2.2-inplaceBlaze.ByteString.Builder'Blaze.ByteString.Builder.Internal.Write%Blaze.ByteString.Builder.Compat.WriteBlaze.ByteString.Builder.Int"Blaze.ByteString.Builder.Html.WordBlaze.ByteString.Builder.Char8"Blaze.ByteString.Builder.Char.Utf8"Blaze.ByteString.Builder.Html.Utf8#Blaze.ByteString.Builder.ByteStringBlaze.ByteString.Builder.HTTPBlaze.ByteString.Builder.Wordbytestring-0.10.12.1 Data.ByteString.Builder.InternalBuilderflushData.ByteString.BuildertoLazyByteStringWritePokerunPokegetPokerunWritegetBound getBound'pokeN exactWrite boundedWrite writeLiftIOwriteIfwriteEq writeOrderingwriteOrd fromWritefromWriteSingleton fromWriteList writeStorable fromStorable fromStorables $fMonoidPoke$fSemigroupPoke $fMonoidWrite$fSemigroupWritewritePrimFixedwritePrimBounded writeInt8 writeInt16be writeInt32be writeInt64be writeInt16le writeInt32le writeInt64le writeInthostwriteInt16hostwriteInt32hostwriteInt64hostfromInt8 fromInt8s fromInt16be fromInt32be fromInt64be fromInt32sbe fromInt16sbe fromInt64sbe fromInt16le fromInt32le fromInt64le fromInt16sle fromInt32sle fromInt64sle fromInthost fromInt16host fromInt32host fromInt64host fromIntshostfromInt16shostfromInt32shostfromInt64shostwordHtmlEscapedwriteHtmlEscapedWordfromHtmlEscapedWordfromHtmlEscapedWordListfromHtmlEscapedByteStringfromHtmlEscapedLazyByteString writeCharfromChar fromStringfromShowfromText fromLazyTextwriteHtmlEscapedCharfromHtmlEscapedCharfromHtmlEscapedStringfromHtmlEscapedShowfromHtmlEscapedTextfromHtmlEscapedLazyTextwriteByteStringfromByteStringfromByteStringWithcopyByteStringinsertByteStringfromLazyByteStringfromLazyByteStringWithcopyLazyByteStringinsertLazyByteStringchunkedTransferEncodingchunkedTransferTerminator writeWord8 writeWord16be writeWord32be writeWord64be writeWord16le writeWord32le writeWord64le writeWordhostwriteWord16hostwriteWord32hostwriteWord64host fromWord8 fromWord8s fromWord16be fromWord32be fromWord64be fromWord32sbe fromWord16sbe fromWord64sbe fromWord16le fromWord32le fromWord64le fromWord16sle fromWord32sle fromWord64sle fromWordhostfromWord16hostfromWord32hostfromWord64host fromWordshostfromWord16shostfromWord32shostfromWord64shost toByteStringtoByteStringIOtoByteStringIOWithtoLazyByteStringWithwriteToByteStringbaseGHC.IntInt16Int32Int64ghc-prim GHC.TypesIntData.ByteString.Internal ByteStringData.ByteString.Lazy.InternalGHC.ShowShowGHC.BaseString text-1.2.4.1Data.Text.InternalTextData.Text.Internal.LazyGHC.WordWord16Word32Word64WordMonoidIO