var searchIndex = {}; searchIndex["oxipng"] = {"doc":"","items":[[3,"Options","oxipng","Options controlling the output of the `optimize` function",null,null],[12,"backup","","Whether the input file should be backed up before writing the output\nDefault: `false`",0,null],[12,"out_file","","Path to write the output file to",0,null],[12,"out_dir","","Used only in CLI interface",0,null],[12,"stdout","","Write to stdout instead of a file\nDefault: `false`",0,null],[12,"fix_errors","","Attempt to fix errors when decoding the input file rather than returning an `Err`\nDefault: `false`",0,null],[12,"pretend","","Don't actually write any output, just calculate the best results\nDefault: `false`",0,null],[12,"recursive","","Used only in CLI interface",0,null],[12,"clobber","","Overwrite existing output files\nDefault: `true`",0,null],[12,"create","","Create new output files if they don't exist\nDefault: `true`",0,null],[12,"force","","Write to output even if there was no improvement in compression\nDefault: `false`",0,null],[12,"preserve_attrs","","Ensure the output file has the same permissions as the input file\nDefault: `false`",0,null],[12,"verbosity","","How verbose the console logging should be (`None` for quiet, `Some(0)` for normal, `Some(1)` for verbose)\nDefault: `Some(0)`",0,null],[12,"filter","","Which filters to try on the file (0-5)\nDefault: `0,5`",0,null],[12,"interlace","","Whether to change the interlacing type of the file\n`None` will not change the current interlacing type\n`Some(x)` will change the file to interlacing mode `x`\nDefault: `None`",0,null],[12,"compression","","Which zlib compression levels to try on the file (1-9)\nDefault: `9`",0,null],[12,"memory","","Which zlib memory levels to try on the file (1-9)\nDefault: `9`",0,null],[12,"strategies","","Which zlib compression strategies to try on the file (0-3)\nDefault: `0-3`",0,null],[12,"window","","Window size to use when compressing the file, as `2^window` bytes\nDoesn't affect compression but may affect speed and memory usage\n8-15 are valid values\nDefault: `15`",0,null],[12,"bit_depth_reduction","","Whether to attempt bit depth reduction\nDefault: `true`",0,null],[12,"color_type_reduction","","Whether to attempt color type reduction\nDefault: `true`",0,null],[12,"palette_reduction","","Whether to attempt palette reduction\nDefault: `true`",0,null],[12,"idat_recoding","","Whether to perform IDAT recoding\nIf any type of reduction is performed, IDAT recoding will be performed\nregardless of this setting\nDefault: `true`",0,null],[12,"strip","","Which headers to strip from the PNG file, if any\nDefault: `None`",0,null],[12,"use_heuristics","","Whether to use heuristics to pick the best filter and compression\nIntended for use with `-o 1` from the CLI interface\nDefault: `false`",0,null],[12,"threads","","Number of threads to use\nDefault: 1.5x CPU cores, rounded down",0,null],[5,"optimize","","Perform optimization on the input file using the options provided",null,{"inputs":[{"name":"path"},{"name":"options"}],"output":{"name":"result"}}],[5,"optimize_from_memory","","Perform optimization on the input file using the options provided, where the file is already\nloaded in-memory",null,null],[0,"colors","","",null,null],[4,"ColorType","oxipng::colors","The color type used to represent this image",null,null],[13,"Grayscale","","Grayscale, with one color channel",1,null],[13,"RGB","","RGB, with three color channels",1,null],[13,"Indexed","","Indexed, with one byte per pixel representing one of up to 256 colors in the image",1,null],[13,"GrayscaleAlpha","","Grayscale + Alpha, with two color channels",1,null],[13,"RGBA","","RGBA, with four color channels",1,null],[4,"BitDepth","","The number of bits to be used per channel per pixel",null,null],[13,"One","","One bit per channel per pixel",2,null],[13,"Two","","Two bits per channel per pixel",2,null],[13,"Four","","Four bits per channel per pixel",2,null],[13,"Eight","","Eight bits per channel per pixel",2,null],[13,"Sixteen","","Sixteen bits per channel per pixel",2,null],[11,"clone","","",1,null],[11,"eq","","",1,null],[11,"fmt","","",1,null],[11,"fmt","","",1,null],[11,"png_header_code","","Get the code used by the PNG specification to denote this color type",1,null],[11,"clone","","",2,null],[11,"eq","","",2,null],[11,"fmt","","",2,null],[11,"fmt","","",2,null],[11,"as_u8","","Retrieve the number of bits per channel per pixel as a `u8`",2,null],[11,"from_u8","","Parse a number of bits per channel per pixel into a `BitDepth`",2,{"inputs":[{"name":"u8"}],"output":{"name":"bitdepth"}}],[0,"deflate","oxipng","",null,null],[0,"deflate","oxipng::deflate","",null,null],[5,"inflate","oxipng::deflate::deflate","Decompress a data stream using the DEFLATE algorithm",null,null],[5,"deflate","","Compress a data stream using the zlib implementation of the DEFLATE algorithm",null,null],[0,"libz_stream","oxipng::deflate","",null,null],[3,"Stream","oxipng::deflate::libz_stream","",null,null],[4,"Compress","","",null,null],[4,"Decompress","","",null,null],[11,"new_compress","","",3,{"inputs":[{"name":"c_int"},{"name":"c_int"},{"name":"c_int"},{"name":"c_int"}],"output":{"name":"stream"}}],[11,"new_decompress","","",3,{"inputs":[],"output":{"name":"stream"}}],[11,"total_in","","",3,null],[11,"total_out","","",3,null],[11,"decompress_vec","","",3,null],[11,"compress_vec","","",3,null],[11,"reset","","",3,null],[11,"drop","","",3,null],[0,"miniz_stream","oxipng::deflate","",null,null],[3,"Stream","oxipng::deflate::miniz_stream","",null,null],[4,"Compress","","",null,null],[4,"Decompress","","",null,null],[11,"new_compress","","",4,{"inputs":[{"name":"c_int"},{"name":"c_int"},{"name":"c_int"},{"name":"c_int"}],"output":{"name":"stream"}}],[11,"new_decompress","","",4,{"inputs":[],"output":{"name":"stream"}}],[11,"total_in","","",4,null],[11,"total_out","","",4,null],[11,"decompress_vec","","",4,null],[11,"compress_vec","","",4,null],[11,"reset","","",4,null],[11,"drop","","",4,null],[0,"headers","oxipng","",null,null],[3,"IhdrData","oxipng::headers","Headers from the IHDR chunk of the image",null,null],[12,"width","","The width of the image in pixels",5,null],[12,"height","","The height of the image in pixels",5,null],[12,"color_type","","The color type of the image",5,null],[12,"bit_depth","","The bit depth of the image",5,null],[12,"compression","","The compression method used for this image (0 for DEFLATE)",5,null],[12,"filter","","The filter mode used for this image (currently only 0 is valid)",5,null],[12,"interlaced","","The interlacing mode of the image (0 = None, 1 = Adam7)",5,null],[4,"Headers","","Options to use for performing operations on headers (such as stripping)",null,null],[13,"None","","None",6,null],[13,"Some","","Some, with a list of 4-character chunk codes",6,null],[13,"Safe","","Headers that won't affect rendering (all but cHRM, gAMA, iCCP, sBIT, sRGB, bKGD, hIST, pHYs, sPLT)",6,null],[13,"All","","All non-critical headers",6,null],[5,"file_header_is_valid","","",null,null],[5,"parse_next_header","","",null,null],[5,"parse_ihdr_header","","",null,null],[11,"clone","","",5,null],[11,"fmt","","",5,null],[11,"clone","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"fmt","","",6,null],[0,"png","oxipng","",null,null],[3,"ScanLines","oxipng::png","An iterator over the scan lines of a PNG image",null,null],[12,"png","","A reference to the PNG image being iterated upon",7,null],[3,"ScanLine","","A scan line in a PNG image",null,null],[12,"filter","","The filter type used to encode the current scan line (0-4)",8,null],[12,"data","","The byte data for the current scan line, encoded with the filter specified in the `filter` field",8,null],[12,"pass","","The current pass if the image is interlaced",8,null],[3,"PngData","","Contains all data relevant to a PNG image",null,null],[12,"idat_data","","The filtered and compressed data of the IDAT chunk",9,null],[12,"ihdr_data","","The headers stored in the IHDR chunk",9,null],[12,"raw_data","","The uncompressed, optionally filtered data from the IDAT chunk",9,null],[12,"palette","","The palette containing colors used in an Indexed image\nContains 3 bytes per color (R+G+B), up to 768",9,null],[12,"transparency_pixel","","The pixel value that should be rendered as transparent",9,null],[12,"transparency_palette","","A map of how transparent each color in the palette should be",9,null],[12,"aux_headers","","All non-critical headers from the PNG are stored here",9,null],[11,"clone","","",7,null],[11,"fmt","","",7,null],[11,"next","","",7,null],[11,"clone","","",8,null],[11,"fmt","","",8,null],[11,"clone","","",9,null],[11,"fmt","","",9,null],[11,"new","","Create a new `PngData` struct by opening a file",9,{"inputs":[{"name":"path"},{"name":"bool"}],"output":{"name":"result"}}],[11,"from_slice","","Create a new `PngData` struct by reading a slice",9,null],[11,"channels_per_pixel","","Return the number of channels in the image, based on color type",9,null],[11,"output","","Format the `PngData` struct into a valid PNG bytestream",9,null],[11,"scan_lines","","Return an iterator over the scanlines of the image",9,null],[11,"unfilter_image","","Reverse all filters applied on the image, returning an unfiltered IDAT bytestream",9,null],[11,"filter_image","","Apply the specified filter type to all rows in the image\n0: None\n1: Sub\n2: Up\n3: Average\n4: Paeth\n5: All (heuristically pick the best filter for each line)",9,null],[11,"reduce_bit_depth","","Attempt to reduce the bit depth of the image\nReturns true if the bit depth was reduced, false otherwise",9,null],[11,"reduce_palette","","Attempt to reduce the number of colors in the palette\nReturns true if the palette was reduced, false otherwise",9,null],[11,"reduce_color_type","","Attempt to reduce the color type of the image\nReturns true if the color type was reduced, false otherwise",9,null],[11,"change_interlacing","","Convert the image to the specified interlacing type\nReturns true if the interlacing was changed, false otherwise\nThe `interlace` parameter specifies the *new* interlacing mode\nAssumes that the data has already been de-filtered",9,null],[11,"fmt","oxipng","",0,null],[11,"clone","","",0,null],[11,"default","","",0,{"inputs":[],"output":{"name":"options"}}]],"paths":[[3,"Options"],[4,"ColorType"],[4,"BitDepth"],[3,"Stream"],[3,"Stream"],[3,"IhdrData"],[4,"Headers"],[3,"ScanLines"],[3,"ScanLine"],[3,"PngData"]]}; initSearch(searchIndex);