mirror of
https://github.com/G2-Games/lbee-utils.git
synced 2025-04-19 07:12:55 -05:00
Removed unnecessary print statements
This commit is contained in:
parent
a9ed206b72
commit
9f7e39a8a3
2 changed files with 1 additions and 5 deletions
|
@ -6,7 +6,7 @@ use crate::compression::{compress2, decompress2, get_chunk_info};
|
||||||
|
|
||||||
pub fn decode<T: Seek + ReadBytesExt + Read>(bytes: &mut T) -> Result<Vec<u8>, CzError> {
|
pub fn decode<T: Seek + ReadBytesExt + Read>(bytes: &mut T) -> Result<Vec<u8>, CzError> {
|
||||||
// Get information about the compressed chunks
|
// Get information about the compressed chunks
|
||||||
let block_info = get_chunk_info(bytes).unwrap();
|
let block_info = get_chunk_info(bytes)?;
|
||||||
bytes.seek(SeekFrom::Start(block_info.length as u64))?;
|
bytes.seek(SeekFrom::Start(block_info.length as u64))?;
|
||||||
|
|
||||||
// Get the bitmap
|
// Get the bitmap
|
||||||
|
|
|
@ -23,13 +23,9 @@ pub fn encode<T: WriteBytesExt + Write>(
|
||||||
bitmap: &[u8],
|
bitmap: &[u8],
|
||||||
header: &CommonHeader,
|
header: &CommonHeader,
|
||||||
) -> Result<(), CzError> {
|
) -> Result<(), CzError> {
|
||||||
let timer = std::time::Instant::now();
|
|
||||||
let bitmap = diff_line(header, bitmap);
|
let bitmap = diff_line(header, bitmap);
|
||||||
println!("diff_line took {:?}", timer.elapsed());
|
|
||||||
|
|
||||||
let timer = std::time::Instant::now();
|
|
||||||
let (compressed_data, compressed_info) = compress(&bitmap, 0xFEFD);
|
let (compressed_data, compressed_info) = compress(&bitmap, 0xFEFD);
|
||||||
println!("Compression took {:?}", timer.elapsed());
|
|
||||||
|
|
||||||
compressed_info.write_into(output)?;
|
compressed_info.write_into(output)?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue