var searchIndex = {}; searchIndex["snap"] = {"doc":"This crate provides an implementation of the\n[Snappy compression format](https://github.com/google/snappy/blob/master/format_description.txt),\nas well as the\n[framing format](https://github.com/google/snappy/blob/master/framing_format.txt).\nThe goal of Snappy is to provide reasonable compression at high speed. On a\nmodern CPU, Snappy can compress data at about 300 MB/sec or more and can\ndecompress data at about 800 MB/sec or more.","items":[[3,"Encoder","snap","Encoder is a raw encoder for compressing bytes in the Snappy format.",null,null],[3,"Decoder","","Decoder is a raw decoder for decompressing bytes in the Snappy format.",null,null],[3,"IntoInnerError","","`IntoInnerError` occurs when consuming a `Writer` fails.",null,null],[3,"Reader","","A reader for decompressing a Snappy stream.",null,null],[3,"Writer","","A writer for compressing a Snappy stream.",null,null],[4,"Error","","Error describes all the possible errors that may occur during Snappy\ncompression or decompression.",null,null],[13,"TooBig","","This error occurs when the given input is too big. This can happen\nduring compression or decompression.",0,null],[12,"given","snap::Error","The size of the given input.",0,null],[12,"max","","The maximum allowed size of an input buffer.",0,null],[13,"BufferTooSmall","snap","This error occurs when the given buffer is too small to contain the\nmaximum possible compressed bytes or the total number of decompressed\nbytes.",0,null],[12,"given","snap::Error","The size of the given output buffer.",0,null],[12,"min","","The minimum size of the output buffer.",0,null],[13,"Empty","snap","This error occurs when trying to decompress a zero length buffer.",0,null],[13,"Header","","This error occurs when an invalid header is found during decompression.",0,null],[13,"HeaderMismatch","","This error occurs when there is a mismatch between the number of\ndecompressed bytes reported in the header and the number of\nactual decompressed bytes. In this error case, the number of actual\ndecompressed bytes is always less than the number reported in the\nheader.",0,null],[12,"expected_len","snap::Error","The total number of decompressed bytes expected (i.e., the header\nvalue).",0,null],[12,"got_len","","The total number of actual decompressed bytes.",0,null],[13,"Literal","snap","This error occurs during decompression when there was a problem\nreading a literal.",0,null],[12,"len","snap::Error","The expected length of the literal.",0,null],[12,"src_len","","The number of remaining bytes in the compressed bytes.",0,null],[12,"dst_len","","The number of remaining slots in the decompression buffer.",0,null],[13,"CopyRead","snap","This error occurs during decompression when there was a problem\nreading a copy.",0,null],[12,"len","snap::Error","The expected length of the copy (as encoded in the compressed\nbytes).",0,null],[12,"src_len","","The number of remaining bytes in the compressed bytes.",0,null],[13,"CopyWrite","snap","This error occurs during decompression when there was a problem\nwriting a copy to the decompression buffer.",0,null],[12,"len","snap::Error","The length of the copy (i.e., the total number of bytes to be\nproduced by this copy in the decompression buffer).",0,null],[12,"dst_len","","The number of remaining bytes in the decompression buffer.",0,null],[13,"Offset","snap","This error occurs during decompression when an invalid copy offset\nis found. An offset is invalid if it is zero or if it is out of bounds.",0,null],[12,"offset","snap::Error","The offset that was read.",0,null],[12,"dst_pos","","The current position in the decompression buffer. If the offset is\nnon-zero, then the offset must be greater than this position.",0,null],[13,"StreamHeader","snap","This error occurs when a stream header chunk type was expected but got\na different chunk type.\nThis error only occurs when reading a Snappy frame formatted stream.",0,null],[12,"byte","snap::Error","The chunk type byte that was read.",0,null],[13,"StreamHeaderMismatch","snap","This error occurs when the magic stream headers bytes do not match\nwhat is expected.\nThis error only occurs when reading a Snappy frame formatted stream.",0,null],[12,"bytes","snap::Error","The bytes that were read.",0,null],[13,"UnsupportedChunkType","snap","This error occurs when an unsupported chunk type is seen.\nThis error only occurs when reading a Snappy frame formatted stream.",0,null],[12,"byte","snap::Error","The chunk type byte that was read.",0,null],[13,"UnsupportedChunkLength","snap","This error occurs when trying to read a chunk with length greater than\nthat supported by this library when reading a Snappy frame formatted\nstream.\nThis error only occurs when reading a Snappy frame formatted stream.",0,null],[12,"len","snap::Error","The length of the chunk encountered.",0,null],[12,"header","","True when this error occured while reading the stream header.",0,null],[13,"Checksum","snap","This error occurs when a checksum validity check fails.\nThis error only occurs when reading a Snappy frame formatted stream.",0,null],[12,"expected","snap::Error","The expected checksum read from the stream.",0,null],[12,"got","","The computed checksum.",0,null],[5,"max_compress_len","snap","Returns the maximum compressed size given the uncompressed size.",null,{"inputs":[{"name":"usize"}],"output":{"name":"usize"}}],[5,"decompress_len","","Returns the decompressed size (in bytes) of the compressed bytes given.",null,null],[11,"new","","Return a new encoder that can be used for compressing bytes.",1,{"inputs":[],"output":{"name":"encoder"}}],[11,"compress","","Compresses all bytes in `input` into `output`.",1,null],[11,"compress_vec","","Compresses all bytes in `input` into a freshly allocated `Vec`.",1,null],[11,"default","","",2,{"inputs":[],"output":{"name":"decoder"}}],[11,"fmt","","",2,null],[11,"clone","","",2,null],[11,"new","","Return a new decoder that can be used for decompressing bytes.",2,{"inputs":[],"output":{"name":"decoder"}}],[11,"decompress","","Decompresses all bytes in `input` into `output`.",2,null],[11,"decompress_vec","","Decompresses all bytes in `input` into a freshly allocated `Vec`.",2,null],[11,"error","","Returns the error which caused the call to `into_inner` to fail.",3,null],[11,"into_inner","","Returns the underlying writer which generated the error.",3,null],[11,"description","","",3,null],[11,"cause","","",3,null],[11,"fmt","","",3,null],[11,"fmt","","",3,null],[11,"fmt","","",0,null],[11,"eq","","",0,null],[11,"description","","",0,null],[11,"cause","","",0,null],[11,"fmt","","",0,null],[11,"new","","Create a new writer for streaming Snappy compression.",4,{"inputs":[{"name":"w"}],"output":{"name":"writer"}}],[11,"into_inner","","Returns the underlying stream, consuming and flushing this writer.",4,null],[11,"drop","","",4,null],[11,"write","","",4,null],[11,"flush","","",4,null],[11,"new","","Create a new reader for streaming Snappy decompression.",5,{"inputs":[{"name":"r"}],"output":{"name":"reader"}}],[11,"read","","",5,null],[6,"Result","","A convenient type alias for `Result<T, snap::Error>`.",null,null]],"paths":[[4,"Error"],[3,"Encoder"],[3,"Decoder"],[3,"IntoInnerError"],[3,"Writer"],[3,"Reader"]]}; initSearch(searchIndex);