Skip to content

Commit

Permalink
Add some do comments to parquet bit_util (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Aug 8, 2021
1 parent ead64b7 commit 32df29b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions parquet/src/util/bit_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,15 @@ impl BitWriter {
}
}

/// Extend buffer size
/// Extend buffer size by `increment` bytes
#[inline]
pub fn extend(&mut self, increment: usize) {
self.max_bytes += increment;
let extra = vec![0; increment];
self.buffer.extend(extra);
}

/// Report buffer size
/// Report buffer size, in bytes
#[inline]
pub fn capacity(&mut self) -> usize {
self.max_bytes
Expand Down Expand Up @@ -332,6 +332,7 @@ impl BitWriter {
self.max_bytes
}

/// Writes the entire byte `value` at the byte `offset`
pub fn write_at(&mut self, offset: usize, value: u8) {
self.buffer[offset] = value;
}
Expand Down

0 comments on commit 32df29b

Please sign in to comment.