MCPcopy Create free account
hub / github.com/bamler-lab/constriction / get_compressed

Method get_compressed

src/stream/stack.rs:471–481  ·  view source on GitHub ↗

Assembles the current compressed data into a single slice. Returns the concatenation of [`bulk`] and [`state`]. The concatenation truncates any trailing zero words, which is compatible with the constructor [`from_compressed`]. This method requires a `&mut self` receiver to temporarily append `state` to [`bulk`] (this mutationwill be reversed to recreate the original `bulk` as soon as the caller

(
        &mut self,
    )

Source from the content-addressed store, hash-verified

469 /// [`iter_compressed`]: #method.iter_compressed
470 /// [`into_compressed`]: #method.into_compressed
471 pub fn get_compressed(
472 &mut self,
473 ) -> Result<impl Deref<Target = Backend> + Debug + Drop + '_, Backend::WriteError>
474 where
475 Backend: ReadWords<Word, Stack> + WriteWords<Word> + Debug,
476 {
477 CoderGuard::<'_, _, _, _, false>::new(self).map_err(|err| match err {
478 CoderError::Frontend(()) => unreachable!("Can't happen for SEALED==false."),
479 CoderError::Backend(err) => err,
480 })
481 }
482
483 pub fn get_binary(
484 &mut self,

Callers 15

test_module_example1Function · 0.95
test_old_module_example1Function · 0.95
test_stack1Function · 0.95
test_stack2Function · 0.95
test_ans_encode_reverse2Function · 0.95
test_ans_encode_reverse3Function · 0.95
test_ans_encode_reverse4Function · 0.95
test_ans_exampleFunction · 0.95
test_model_mod1Function · 0.95
test_model_mod2Function · 0.95
test_categorical1Function · 0.95
test_categorical2Function · 0.95

Calls

no outgoing calls

Tested by 15

test_module_example1Function · 0.76
test_old_module_example1Function · 0.76
test_stack1Function · 0.76
test_stack2Function · 0.76
test_ans_encode_reverse2Function · 0.76
test_ans_encode_reverse3Function · 0.76
test_ans_encode_reverse4Function · 0.76
test_ans_exampleFunction · 0.76
test_model_mod1Function · 0.76
test_model_mod2Function · 0.76
test_categorical1Function · 0.76
test_categorical2Function · 0.76