forked from pola-rs/polars
/
index.html
34 lines (31 loc) · 7.24 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A pure rust replacement for the miniz DEFLATE/zlib encoder/decoder. The plan for this crate is to be used as a back-end for the flate2 crate and eventually remove the need to depend on a C library."><meta name="keywords" content="rust, rustlang, rust-lang, miniz_oxide"><title>miniz_oxide - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../miniz_oxide/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate miniz_oxide</p><div class="block version"><p>Version 0.4.4</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all miniz_oxide's items</p></a><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class="location"></p><div id="sidebar-vars" data-name="miniz_oxide" data-ty="mod" data-relpath="../"></div></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">miniz_oxide</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/miniz_oxide/lib.rs.html#1-167" title="goto source code">[src]</a></span></h1><div class="docblock"><p>A pure rust replacement for the <a href="https://github.com/richgel999/miniz">miniz</a>
DEFLATE/zlib encoder/decoder.
The plan for this crate is to be used as a back-end for the
<a href="https://github.com/alexcrichton/flate2-rs">flate2</a> crate and eventually remove the
need to depend on a C library.</p>
<h1 id="usage" class="section-header"><a href="#usage">Usage</a></h1><h2 id="simple-compressiondecompression" class="section-header"><a href="#simple-compressiondecompression">Simple compression/decompression:</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">miniz_oxide</span>::<span class="ident">inflate</span>::<span class="ident">decompress_to_vec</span>;
<span class="kw">use</span> <span class="ident">miniz_oxide</span>::<span class="ident">deflate</span>::<span class="ident">compress_to_vec</span>;
<span class="kw">fn</span> <span class="ident">roundtrip</span>(<span class="ident">data</span>: <span class="kw-2">&</span>[<span class="ident">u8</span>]) {
<span class="kw">let</span> <span class="ident">compressed</span> <span class="op">=</span> <span class="ident">compress_to_vec</span>(<span class="ident">data</span>, <span class="number">6</span>);
<span class="kw">let</span> <span class="ident">decompressed</span> <span class="op">=</span> <span class="ident">decompress_to_vec</span>(<span class="ident">compressed</span>.<span class="ident">as_slice</span>()).<span class="ident">expect</span>(<span class="string">"Failed to decompress!"</span>);
}
</pre></div>
</div><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<table><tr class="module-item"><td><a class="mod" href="deflate/index.html" title="miniz_oxide::deflate mod">deflate</a></td><td class="docblock-short"><p>This module contains functionality for compression.</p>
</td></tr><tr class="module-item"><td><a class="mod" href="inflate/index.html" title="miniz_oxide::inflate mod">inflate</a></td><td class="docblock-short"><p>This module contains functionality for decompression.</p>
</td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.StreamResult.html" title="miniz_oxide::StreamResult struct">StreamResult</a></td><td class="docblock-short"><p>A structure containg the result of a call to the inflate or deflate streaming functions.</p>
</td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
<table><tr class="module-item"><td><a class="enum" href="enum.DataFormat.html" title="miniz_oxide::DataFormat enum">DataFormat</a></td><td class="docblock-short"><p>How compressed data is wrapped.</p>
</td></tr><tr class="module-item"><td><a class="enum" href="enum.MZError.html" title="miniz_oxide::MZError enum">MZError</a></td><td class="docblock-short"><p>A list of miniz failed status codes.</p>
</td></tr><tr class="module-item"><td><a class="enum" href="enum.MZFlush.html" title="miniz_oxide::MZFlush enum">MZFlush</a></td><td class="docblock-short"><p>A list of flush types.</p>
</td></tr><tr class="module-item"><td><a class="enum" href="enum.MZStatus.html" title="miniz_oxide::MZStatus enum">MZStatus</a></td><td class="docblock-short"><p>A list of miniz successful status codes.</p>
</td></tr></table><h2 id="types" class="section-header"><a href="#types">Type Definitions</a></h2>
<table><tr class="module-item"><td><a class="type" href="type.MZResult.html" title="miniz_oxide::MZResult type">MZResult</a></td><td class="docblock-short"><p><code>Result</code> alias for all miniz status codes both successful and failed.</p>
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="miniz_oxide" data-search-js="../search-index.js"></div>
<script src="../main.js"></script></body></html>