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

Method seek

src/pybindings/stream/stack.rs:301–309  ·  view source on GitHub ↗
(&mut self, position: usize, state: u64)

Source from the content-addressed store, hash-verified

299 /// ```
300 #[pyo3(signature = (position, state))]
301 pub fn seek(&mut self, position: usize, state: u64) -> PyResult<()> {
302 self.inner.seek((position, state)).map_err(|()| {
303 pyo3::exceptions::PyValueError::new_err(
304 "Tried to seek past end of stream. Note: in an ANS coder,\n\
305 both decoding and seeking *consume* compressed data. The Python API of\n\
306 `constriction`'s ANS coder currently does not support seeking backward.",
307 )
308 })
309 }
310
311 /// Resets the encoder to an empty state.
312 ///

Callers 6

test_ans_seekFunction · 0.95
test_ans_seekFunction · 0.95
test_ans_seekFunction · 0.95
test_ans_seekFunction · 0.95
ans_round_tripFunction · 0.45
range_round_tripFunction · 0.45

Calls

no outgoing calls

Tested by 4

test_ans_seekFunction · 0.76
test_ans_seekFunction · 0.76
test_ans_seekFunction · 0.76
test_ans_seekFunction · 0.76