@@ -23,13 +23,15 @@ pub(crate) fn default_max_decoded_len(compressed_words: usize) -> usize {
2323///
2424/// # Implementing this trait
2525///
26- /// ```rust,ignore
26+ /// ```
27+ /// # use fastpfor::{BlockCodec, FastPForResult};
28+ /// struct MyCodec;
2729/// impl BlockCodec for MyCodec {
2830/// type Block = [u32; 256];
29- /// fn encode_blocks(&self, blocks: &[[u32; 256]], out: &mut Vec<u32>)
30- /// -> FastPForResult<()> { ... }
31- /// fn decode_blocks(&self, input: &[u32], expected_len: Option<u32>,
32- /// out: &mut Vec<u32>) -> FastPForResult<usize> { ... }
31+ /// fn encode_blocks(&mut self, blocks: &[[u32; 256]], out: &mut Vec<u32>)
32+ /// -> FastPForResult<()> { todo!() }
33+ /// fn decode_blocks(&mut self, input: &[u32], expected_len: Option<u32>,
34+ /// out: &mut Vec<u32>) -> FastPForResult<usize> { todo!() }
3335/// }
3436/// ```
3537pub trait BlockCodec {
@@ -150,7 +152,8 @@ pub trait AnyLenCodec {
150152///
151153/// # Example
152154///
153- /// ```rust,ignore
155+ /// ```ignore
156+ /// # use fastpfor::{slice_to_blocks, FastPForBlock256};
154157/// let data: Vec<u32> = (0..600).collect(); // 2 × 256 + 88 remainder
155158/// let (blocks, remainder) = slice_to_blocks::<FastPForBlock256>(&data);
156159/// assert_eq!(blocks.len(), 2); // 2 blocks of [u32; 256]
0 commit comments