Debian Codegraph @

src/lz4_hc/stream/mod.rs

raw symbols SCIP
1 mod apirust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/;
2
3 use craterust-analyzer cargo lzzzz 2.0.0 crate/::{commonrust-analyzer cargo lzzzz 2.0.0 common/::DICTIONARY_SIZErust-analyzer cargo lzzzz 2.0.0 common/DICTIONARY_SIZE., lz4rust-analyzer cargo lzzzz 2.0.0 lz4/, lz4_hcrust-analyzer cargo lzzzz 2.0.0 lz4_hc/::FavorDecSpeedrust-analyzer cargo lzzzz 2.0.0 lz4_hc/FavorDecSpeed#, Resultrust-analyzer cargo lzzzz 2.0.0 common/error/Result#};
4 use apirust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/::CompressionContextrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/CompressionContext#;
5 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{borrowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/::Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#, cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/, iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Cursorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/Cursor#, pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/::Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#};
6
7 /// Streaming LZ4_HC compressor.
8 ///
9 /// # Example
10 ///
11 /// ```
12 /// use lzzzz::{lz4, lz4_hc};
13 ///
14 /// let data = b"The quick brown fox jumps over the lazy dog.";
15 /// let mut buf = [0u8; 256];
16 ///
17 /// // The slice should have enough capacity.
18 /// assert!(buf.len() >= lz4::max_compressed_size(data.len()));
19 ///
20 /// let mut comp = lz4_hc::Compressor::new()?;
21 /// let len = comp.next(data, &mut buf)?;
22 /// let compressed = &buf[..len];
23 ///
24 /// # let mut buf = [0u8; 256];
25 /// # let len = lz4::decompress(compressed, &mut buf[..data.len()])?;
26 /// # assert_eq!(&buf[..len], &data[..]);
27 /// # Ok::<(), std::io::Error>(())
28 /// ```
29 pub struct Compressorrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#<'a> {
30 ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx.: CompressionContextrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/CompressionContext#,
31 dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#dict.: Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#<Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'a, [u8]>>,
32 safe_bufrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#safe_buf.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>,
33 }
34
35 impl<'a> Compressorrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#<'a> {
36 /// Creates a new `Compressor`.
37 pub fn newrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]new().() -> Resultrust-analyzer cargo lzzzz 2.0.0 common/error/Result#<Selfrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]> {
38 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Selfrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`] {
39 ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx.: CompressionContextrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/CompressionContext#::newrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/impl#[CompressionContext]new().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().,
40 dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#dict.: Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#::newrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/impl#[`Pin<Ptr>`]new().(Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#::Borrowedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#Borrowed#(&[])),
41 safe_bufrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#safe_buf.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(),
42 })
43 }
44
45 /// Creates a new `Compressor` with a dictionary.
46 pub fn with_dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]with_dict().<D>(dict: D, compression_level: i32) -> Resultrust-analyzer cargo lzzzz 2.0.0 common/error/Result#<Selfrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]>
47 where
48 D: Intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#<Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'a, [u8]>>,
49 {
50 // Note(sewer56).
51 // The LZ4 documentation states the following:
52 // - In order for LZ4_loadDictHC() to create the correct data structure,
53 // it is essential to set the compression level _before_ loading the dictionary.
54 // Therefore this API requires a `compression_level`.
55
56 let mut comp = Selfrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`] {
57 dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#dict.: Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#::newrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/impl#[`Pin<Ptr>`]new().(dict.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().()),
58 ..Selfrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]::newrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]new().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
59 };
60
61 comp.ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx..set_compression_levelrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/impl#[CompressionContext]set_compression_level().(compression_level);
62 comp.ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx..load_dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/impl#[CompressionContext]load_dict().(&comp.dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#dict.);
63 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(comp)
64 }
65
66 /// Sets the compression level.
67 pub fn set_compression_levelrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]set_compression_level().(&mut self, level: i32) {
68 self.ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx..set_compression_levelrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/impl#[CompressionContext]set_compression_level().(level);
69 }
70
71 /// Sets the decompression speed mode flag.
72 pub fn set_favor_dec_speedrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]set_favor_dec_speed().(&mut self, dec_speed: FavorDecSpeedrust-analyzer cargo lzzzz 2.0.0 lz4_hc/FavorDecSpeed#) {
73 self.ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx.
74 .set_favor_dec_speedrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/impl#[CompressionContext]set_favor_dec_speed().(dec_speed rust-analyzer cargo lzzzz 2.0.0 lz4_hc/impl#[FavorDecSpeed][`PartialEq<Self>`]eq().==rust-analyzer cargo lzzzz 2.0.0 lz4_hc/impl#[FavorDecSpeed][`PartialEq<Self>`]eq(). rust-analyzer cargo lzzzz 2.0.0 lz4_hc/impl#[FavorDecSpeed][`PartialEq<Self>`]eq().FavorDecSpeedrust-analyzer cargo lzzzz 2.0.0 lz4_hc/FavorDecSpeed#::Enabledrust-analyzer cargo lzzzz 2.0.0 lz4_hc/FavorDecSpeed#Enabled#);
75 }
76
77 /// Performs LZ4_HC streaming compression.
78 ///
79 /// Returns the number of bytes written into the destination buffer.
80 pub fn nextrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]next().(&mut self, src: &[u8], dst: &mut [u8]) -> Resultrust-analyzer cargo lzzzz 2.0.0 common/error/Result#<usize> {
81 self.next_to_ptrrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]next_to_ptr().(src, dst.as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]as_mut_ptr().(), dst.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().())
82 }
83
84 fn next_to_ptrrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]next_to_ptr().(&mut self, src: &[u8], dst: *mut u8, dst_len: usize) -> Resultrust-analyzer cargo lzzzz 2.0.0 common/error/Result#<usize> {
85 let result = self.ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx..nextrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/impl#[CompressionContext]next().(src, dst, dst_len)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
86 self.save_dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]save_dict().();
87 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(result)
88 }
89
90 /// Performs LZ4_HC streaming compression to fill `dst`.
91 ///
92 /// This function either compresses the entire `src` buffer into `dst` if it's
93 /// large enough, or will fill `dst` with as much data as possible from `src`.
94 ///
95 /// Returns a pair `(read, wrote)` giving the number of bytes read from `src`
96 /// and the number of bytes written to `dst`.
97 ///
98 /// # Example
99 ///
100 /// ```
101 /// use lzzzz::{lz4, lz4_hc};
102 ///
103 /// let data = b"The quick brown fox jumps over the lazy dog.";
104 ///
105 /// let mut smallbuf = [0u8; 32];
106 /// assert!(smallbuf.len() < lz4::max_compressed_size(data.len()));
107 ///
108 /// let mut comp = lz4_hc::Compressor::new()?;
109 /// let (read, wrote) = comp.next_fill(data, &mut smallbuf)?;
110 /// let remaining_data = &data[read..];
111 ///
112 /// # let mut buf = [0u8; 256];
113 /// # let len = lz4::decompress(&smallbuf, &mut buf)?;
114 /// # assert_eq!(&buf[..len], &data[..read]);
115 /// # Ok::<(), std::io::Error>(())
116 /// ```
117 pub fn next_fillrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]next_fill().(&mut self, src: &[u8], dst: &mut [u8]) -> Resultrust-analyzer cargo lzzzz 2.0.0 common/error/Result#<(usize, usize)> {
118 let (src_len, dst_len) = self.ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx..next_partialrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/impl#[CompressionContext]next_partial().(src, dst)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
119 self.save_dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]save_dict().();
120 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#((src_len, dst_len))
121 }
122
123 /// Compresses data until the destination slice fills up.
124 ///
125 /// Returns the number of bytes written into the destination buffer.
126 #[deprecated(since = "1.1.0", note = "Use next_fill instead.")]
127 pub fn next_partialrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]next_partial().<T>(&mut self, src: &mut Cursorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/Cursor#<T>, dst: &mut [u8]) -> Resultrust-analyzer cargo lzzzz 2.0.0 common/error/Result#<usize>
128 where
129 T: AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<[u8]>,
130 {
131 let src_ref = src.get_refrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/impl#[`Cursor<T>`]get_ref().().as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().();
132 let pos = cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/min().(src_ref.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().(), src.positionrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/impl#[`Cursor<T>`]position().() as usize);
133 let src_ref = &src_ref[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().pos..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().;
134 let (src_len, dst_len) = self.ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx..next_partialrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/impl#[CompressionContext]next_partial().(src_ref, dst)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
135 src.set_positionrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/impl#[`Cursor<T>`]set_position().(src.positionrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/impl#[`Cursor<T>`]position().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().src_len as u64);
136 self.save_dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]save_dict().();
137 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(dst_len)
138 }
139
140 /// Appends a compressed frame to `Vec<u8>`.
141 ///
142 /// Returns the number of bytes appended to the given `Vec<u8>`.
143 pub fn next_to_vecrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]next_to_vec().(&mut self, src: &[u8], dst: &mut Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>) -> Resultrust-analyzer cargo lzzzz 2.0.0 common/error/Result#<usize> {
144 let orig_len = dst.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().();
145 dst.reserverust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]reserve().(lz4rust-analyzer cargo lzzzz 2.0.0 lz4/::max_compressed_sizerust-analyzer cargo lzzzz 2.0.0 lz4/block/max_compressed_size().(src.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().()));
146 #[allow(unsafe_code)]
147 unsafe {
148 let result = self.next_to_ptrrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]next_to_ptr().(
149 src,
150 dst.as_mut_ptrrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]as_mut_ptr().().addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`]add().(orig_len),
151 dst.capacityrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]capacity().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().orig_len,
152 );
153 dst.set_lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]set_len().(orig_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<&usize>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<&usize>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<&usize>`]add().result.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]as_ref().().unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap_or().(&0));
154 result
155 }
156 }
157
158 fn save_dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]save_dict().(&mut self) {
159 self.safe_bufrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#safe_buf..resizerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]resize().(DICTIONARY_SIZErust-analyzer cargo lzzzz 2.0.0 common/DICTIONARY_SIZE., 0);
160 self.ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx..save_dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/impl#[CompressionContext]save_dict().(&mut self.safe_bufrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#safe_buf.);
161 }
162
163 /// Attaches a dictionary stream for efficient dictionary reuse.
164 ///
165 /// This allows efficient re-use of a static dictionary multiple times by referencing
166 /// the dictionary stream in-place rather than copying it.
167 ///
168 /// # Arguments
169 ///
170 /// * `dict_stream` - The dictionary stream to attach, or None to unset any existing dictionary
171 /// * `compression_level` - The compression level to use (CLEVEL_MIN to CLEVEL_MAX)
172 ///
173 /// # Notes
174 ///
175 /// - The dictionary stream must have been prepared using `with_dict()`
176 /// - The dictionary will only remain attached through the first compression call
177 /// - The dictionary stream (and its source buffer) must remain valid through the compression session
178 ///
179 /// # Example
180 ///
181 /// ```
182 /// use lzzzz::lz4_hc;
183 ///
184 /// let dict_data = b"dictionary data";
185 /// let data = b"data to compress";
186 ///
187 /// // Create dictionary stream
188 /// let dict_comp = lz4_hc::Compressor::with_dict(dict_data, lz4_hc::CLEVEL_DEFAULT)?;
189 ///
190 /// // Create working stream and attach dictionary
191 /// let mut comp = lz4_hc::Compressor::new()?;
192 /// comp.attach_dict(Some(&dict_comp), lz4_hc::CLEVEL_DEFAULT);
193 ///
194 /// // Compress data using the attached dictionary
195 /// let mut buf = [0u8; 256];
196 /// let len = comp.next(data, &mut buf)?;
197 /// # Ok::<(), std::io::Error>(())
198 /// ```
199 pub fn attach_dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/impl#[`Compressor<'a>`]attach_dict().(&mut self, dict_stream: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&Compressorrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#<'a>>, compression_level: i32) {
200 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(dict) = dict_stream {
201 self.ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx..attach_dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/impl#[CompressionContext]attach_dict().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&dict.ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx.), compression_level);
202 } else {
203 self.ctxrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/Compressor#ctx..attach_dictrust-analyzer cargo lzzzz 2.0.0 lz4_hc/stream/api/impl#[CompressionContext]attach_dict().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, compression_level);
204 }
205 }
206 }