Files
succinct_rs
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
use super::Blocks;
use crate::internal_data_structure::raw_bit_vector::RawBitVector;

impl super::Chunk {
    /// Constructor.
    pub fn new(value: u64, length: u16, rbv: &RawBitVector, i_chunk: u64) -> Self {
        let blocks = Blocks::new(rbv, i_chunk, length);
        Self {
            value,
            length,
            blocks,
        }
    }

    /// Returns the content of the chunk.
    pub fn value(&self) -> u64 {
        self.value
    }
}