forked from pola-rs/polars
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
30 lines (26 loc) · 6.88 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
<!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="This module provides access to the block mode functions of the lz4 C library. It somehow resembles the Python-lz4 api, but using Rust’s Option type, the function parameters have been a little simplified. As does python-lz4, this module supports prepending the compressed buffer with a u32 value representing the size of the original, uncompressed data."><meta name="keywords" content="rust, rustlang, rust-lang, block"><title>lz4::block - 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='../../lz4/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module block</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../index.html">lz4</a></p><div id="sidebar-vars" data-name="block" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></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">Module <a href="../index.html">lz4</a>::<wbr><a class="mod" href="">block</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/lz4/block/mod.rs.html#1-278" title="goto source code">[src]</a></span></h1><div class="docblock"><p>This module provides access to the block mode functions of the lz4 C library.
It somehow resembles the <a href="http://python-lz4.readthedocs.io/en/stable/lz4.block.html">Python-lz4</a> api,
but using Rust’s Option type, the function parameters have been a little simplified.
As does python-lz4, this module supports prepending the compressed buffer with a u32 value
representing the size of the original, uncompressed data.</p>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">lz4</span>::<span class="ident">block</span>::{<span class="ident">compress</span>,<span class="ident">decompress</span>};
<span class="kw">let</span> <span class="ident">v</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[<span class="number">0u8</span>; <span class="number">1024</span>];
<span class="kw">let</span> <span class="ident">comp_with_prefix</span> <span class="op">=</span> <span class="ident">compress</span>(<span class="kw-2">&</span><span class="ident">v</span>, <span class="prelude-val">None</span>, <span class="bool-val">true</span>).<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="ident">comp_wo_prefix</span> <span class="op">=</span> <span class="ident">compress</span>(<span class="kw-2">&</span><span class="ident">v</span>, <span class="prelude-val">None</span>, <span class="bool-val">false</span>).<span class="ident">unwrap</span>();
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">v</span>, <span class="ident">decompress</span>(<span class="kw-2">&</span><span class="ident">comp_with_prefix</span>, <span class="prelude-val">None</span>).<span class="ident">unwrap</span>());
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">v</span>, <span class="ident">decompress</span>(<span class="kw-2">&</span><span class="ident">comp_wo_prefix</span>, <span class="prelude-val">Some</span>(<span class="number">1024</span>)).<span class="ident">unwrap</span>());</pre></div>
</div><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
<table><tr class="module-item"><td><a class="enum" href="enum.CompressionMode.html" title="lz4::block::CompressionMode enum">CompressionMode</a></td><td class="docblock-short"><p>Represents the compression mode do be used.</p>
</td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.compress.html" title="lz4::block::compress fn">compress</a></td><td class="docblock-short"><p>Compresses the full src buffer using the specified CompressionMode, where None and Some(Default)
are treated equally. If prepend_size is set, the source length will be prepended to the output
buffer.</p>
</td></tr><tr class="module-item"><td><a class="fn" href="fn.decompress.html" title="lz4::block::decompress fn">decompress</a></td><td class="docblock-short"><p>Decompresses the src buffer. If uncompressed_size is None, the source length will be read from
the start of the input buffer.</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="lz4" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>