Implement chunk loading

This commit is contained in:
Thinkofname 2016-03-21 14:05:13 +00:00
parent ddf3a7981c
commit a42c1e412a
2 changed files with 8 additions and 1 deletions

View File

@ -59,6 +59,13 @@ impl Map {
}
map
}
pub fn from_raw(bits: Vec<u64>, size: usize) -> Map {
Map {
length: (bits.len()*64 + 63) / size,
bit_size: size,
bits: bits,
}
}
pub fn resize(&self, size: usize) -> Map {
let mut n = Map::new(self.length, size);

View File

@ -14,7 +14,7 @@
pub struct Array {
data: Vec<u8>,
pub data: Vec<u8>,
}
impl Array {