h,/-y&      !"#$%0.1.1None"%&)*01369>c &snappy-cIntended for efficiency in the case of a bunch of appends followed by a bunch of splits.'snappy-c Empty buffer(snappy-cIs the & empty?O(1))snappy-cLengthO(1)*snappy-cAppend data to the end of the &.O(n)" if the given buffer is forwards, O(1) otherwise.+snappy-c*Get the buffered chunks in backwards orderO(n)" if the given buffer is forwards, O(1) otherwise.,snappy-cGet the buffer data as a  paired with its length.O(n) if the buffer is backward, O(1) otherwise.-snappy-c Create a & from a  paired with its length.O(1).snappy-cSplit off a chunk of exactly n bytes.P0snappy-cCompressed buffersnappy-cCompressed lengthsnappy-cResultsnappy-c.Status indicator (0 => Ok, 1 => Invalid input)1snappy-c Compressedsnappy-cCompressed lengthsnappy-cUncompressed (target) buffersnappy-cUncompressed lengthsnappy-cStatus indicator (0 => Ok, 1 => Invalid input, 2 => Target buffer too small)2snappy-cSource buffer sizesnappy-cMax size after compression3snappy-c Source buffersnappy-cSource buffer sizesnappy-c Target buffersnappy-cTarget buffer sizesnappy-cStatus indicator (0 => Ok, 1 => Invalid input, 2 => Target buffer too small)3210 None"%&)*01369> 94snappy-cMasked CRC32C checksum5snappy-c Calculate6snappy-cEncode7snappy-cDecode Precondition: Input must be exactly 4 bytes.5764 None"%&)*01369> 8snappy-cIf a 95 is given, throw the contained value as an exception.8(c) 2024 Finley McIlwaineBSD-3-Clause (see LICENSE)(Finley McIlwaine None"%&)*01369> snappy-cCompress the input using  !https://github.com/google/snappy/Snappy.$The result is in Snappy raw format, not the framing format.snappy-cDecompress the input using  !https://github.com/google/snappy/Snappy.Returns : if the input is not in Snappy raw format or otherwise ill-formed. None"%&)*01369>!(snappy-c)Possible failure modes for decompression.snappy-cDecode parameters snappy-c;Verify the uncompressed data checksums during decompression Defaults to ;. Even if we don't verify the CRC, if the data is not Snappy compressed then decompression will likely still fail due to failing to decode the frame headers.*To enable this, use the incremental API ( ). Note that checksum verification adds a significant overhead to decompression.<snappy-c0Pair of decompressed data chunks and an updated  .=snappy-c3Have we decoded a header for the current frame yet?If so, what was that header? snappy-cBuffers compressed data for decompression and holds some useful decompression state.>snappy-cTracks partial information about the buffer, e.g. whether we have decoded a header and how many bytes we need to fully decode a frame.?snappy-cAccumulated Snappy framed data. Invariant:; This buffer never holds a fully decodable Snappy frame.@snappy-c.A pair of frame-encoded chunks and an updated .Asnappy-cDetermines how much uncompressed data is stored in each resulting frame. snappy-c%Compression threshold, with explicit   and  settings. snappy-cCompress everythingsnappy-cCompress nothingsnappy-c-Uncompressed size divided by compressed size.Only produce compressed frames if the compression ratio for the data is equal to or above this threshold.A higher threshold may result in less frames holding compressed data, and thus faster decompression/decoding. ?https://github.com/google/snappy?tab=readme-ov-file#performanceAccording to Google, the typical highest compression ratio that Snappy achieves is about 4, so a  of > 4.0 should be similar to  , while a  of < 7/8 should be similar to  .snappy-c%Number of bytes of uncompressed data.snappy-cDetermines how much data is put in each Snappy frame and whether it is compressed.snappy-cCompression threshold.snappy-c=Exact amount of uncompressed data included in a single frame.snappy-c*Buffers uncompressed data for compression.Bsnappy-cSnappy frame identifiers.Csnappy-cA frame's header contains an identifier corresponding to the frame type and the size of the payload.Dsnappy-c0Snappy frames consist of a header and a payload.Esnappy-c2The one byte value corresponding to an identifier.Fsnappy-c Encode an G% as a three byte little-endian value.snappy-cThe default frame size is 65536 bytes, which is the maximum allowed by the  =https://github.com/google/snappy/blob/main/framing_format.txt"Snappy framing format description.Hsnappy-cSee section 4.2 of the  =https://github.com/google/snappy/blob/main/framing_format.txt"Snappy framing format description.snappy-c Create a .2Must be within the inclusive range [ 1 .. 65536 ].snappy-c Unwrap a Isnappy-cThe default threshold is a ratio of 8:7, which was taken from the  https://github.com/golang/snappy/blob/43d5d4cd4e0e3390b0b645d5c3ef1187642403d8/encode.go#L231golang/snappy implementation.snappy-cInitialize an  with the given maximum number of bytes of uncompressed data to include in frames resulting from the . If the given number of bytes is not in the inclusive range [1 .. 65536], 65536 is used.The  holds the Snappy stream identifier frame that must be included at the start of every Snappy frame encoded stream.snappy-cCall to indicate no more input and flush the remaining data in the  into a new frame. If there is no more data in the , an empty list is returned. Precondition:- The buffer does not hold more data than the  in the . Use the postcondition of J to ensure this.Jsnappy-cFill and compress/encode as many frames as possible with the data in the .O(1)= if there are not enough bytes in the buffer to fill a frame.Postcondition:3 The resulting buffer never holds more than the  given in the .Ksnappy-c:Encode the input as a potentially compressed Snappy frame.This function takes a  because it must pass all of the data to a C function which expects the data to sit in a single buffer.Lsnappy-cDefault decode parameterssnappy-c The empty  , in an initial state.snappy-cVerify that the   is complete.If the   's buffer still has data in it,  is returned.Msnappy-cDecompress/decode as many frames as possible with the data in the  .;This is not as lazy as it could be. If we had a version of N that threw exceptions on failure, we could be a bit more lazy. It's not clear to me if this would actually be good for performance.O(1)/ if there are insufficient bytes in the buffer.Osnappy-c Decode header Precondition: The given  must be exactly 4 bytes long.Nsnappy-cDecode a frame Precondition: The given + is the payload associated with the given C.Psnappy-cIf checksum verification is enabled, compute the checksum and compare against the decoded checksum.snappy-cDatasnappy-cReceivedsnappy-cComputedPsnappy-cEncoded little-endian checksumsnappy-cUncompressed payload=MLQJ @XYZA[\]^D_`aBbcdefg (c) 2024 Finley McIlwaineBSD-3-Clause (see LICENSE)(Finley McIlwaine None"%&)*01369>-, snappy-cCompress the input using  !https://github.com/google/snappy/Snappy.,The output stream is in Snappy frame format.snappy-cCompress the input using  !https://github.com/google/snappy/Snappy with the given .,The output stream is in Snappy frame format.snappy-cAppend the data to the 0 buffer and do as much compression as possible.Postconditions:The resulting 3 will not have more data in its buffer than the  chunkSize in the .Each encoded frame will hold exactly one  chunkSize worth of uncompressed data. snappy-cDecompress the input using  !https://github.com/google/snappy/Snappy.The input stream is expected to be in the official Snappy frame format.Note:2 The extra laziness of this function (compared to #) comes at the cost of potential exceptions during decompression.!snappy-cDecompress the input using  !https://github.com/google/snappy/Snappy with the given .The input stream is expected to be in the official Snappy frame format.Note:3 The extra laziness of this function (compared to $) comes at the cost of potential exceptions during decompression."snappy-cAppend the data to the  2 buffer and do as much decompression as possible.Throws an exception if any  occurs.#snappy-cDecompress the input using  !https://github.com/google/snappy/Snappy.The input stream is expected to be in the official Snappy frame format. Evaluates to a # if the input stream is ill-formed.WARNING: This function is not as lazy as you might hope. To determine whether the result is a ", it must load the entire source / into memory during decompression. Use either ! or the incremental % instead. If you are truly okay with the extra memory overhead, you may ignore this warning.$snappy-cDecompress the input using  !https://github.com/google/snappy/Snappy with the given .The input stream is expected to be in the official Snappy frame format. Evaluates to a # if the input stream is ill-formed.WARNING: This function is not as lazy as you might hope. To determine whether the result is a ", it must load the entire source / into memory during decompression. Use either ! or the incremental % instead. If you are truly okay with the extra memory overhead, you may ignore this warning.%snappy-cAppend the data to the  2 buffer and do as much decompression as possible.Note:! This function is not as lazy as ", since it must completely decode the given chunk before providing a result.$ #"%!$  $   # !$ "%                      ! " # $ % & ' ()* +,-./0123456789:; < = > ? @ABCADEFGH I J K L M N O P Q R SFGT U V W X Y Z [ \ ] ^ I I_ I` a b  M Mc Md N Ne   f Q Qg Qh i j k l m nsnappy-c-0.1.1-inplaceCodec.Compression.SnappyC.Raw Codec.Compression.SnappyC.Framedsnappy-c)Codec.Compression.SnappyC.Internal.BufferLazy ByteStringStrict$Codec.Compression.SnappyC.Internal.C+Codec.Compression.SnappyC.Internal.Checksum'Codec.Compression.SnappyC.Internal.Util.Codec.Compression.SnappyC.Internal.FrameFormatdecompressStepcompress decompress DecodeFailureDecompressionErrorReservedUnskippableFrameId BadStreamId BadChecksumNotDone DecodeParamsverifyChecksumDecoder ThresholdAlwaysCompress NeverCompressRatio FrameSize EncodeParams threshold frameSizeEncoderdefaultFrameSizecustomFrameSize unFrameSizeinitializeEncoderfinalizeEncoderinitializeDecoderfinalizeDecodercompressWithParams compressStepdecompressWithParams decompress'decompressWithParams'decompressStep'Bufferemptynulllengthappend backwardstoLazyfromLazy splitExactlytoStrictsnappy_uncompressed_lengthsnappy_uncompresssnappy_max_compressed_lengthsnappy_compressChecksum calculateencodedecode throwLeftbase Data.EitherLeft GHC.MaybeNothingghc-prim GHC.TypesFalse DecodeResult DecodeState decoderState decoderBuffer EncodeResult EncodeStateFrameIdentifier FrameHeaderFrameencodeFrameIdentifierencodeFrameHeaderIntsnappySpecMaxChunkBytesdefaultThresholdencodeBuffered encodeChunkdefaultDecodeParamsdecodeBuffered decodeFrame decodeHeader verifyPayloaddefaultEncodeParamsdecodeResultDecodeddecodeResultDecoderInitial KnownHeaderencodeResultEncodedencodeResultEncoderencodeStateMaxChunkBytes encoderBuffer frameHeader framePayload CompressedPaddingReservedSkippableReservedUnskippableStreamId Uncompressed