add async feature #1

Merged
b4tman merged 62 commits from async into master 2023-08-18 06:29:46 +00:00
Showing only changes of commit 68b276ce5e - Show all commits

View File

@ -1,3 +1,4 @@
use std::marker::PhantomData;
use std::{path::Path, sync::Arc};
use async_compression::tokio::bufread::ZstdDecoder;
@ -48,7 +49,7 @@ where
data_buf: Vec<u8>,
table: Vec<LSize>,
compress_lvl: Level,
_t: Option<Arc<T>>, // PhantomData replacement
_t: PhantomData<Arc<T>>,
}
impl<T> Writer<T>
@ -69,7 +70,7 @@ where
data_buf,
table,
compress_lvl,
_t: None,
_t: PhantomData,
})
}
@ -132,7 +133,7 @@ where
mmap: AsyncMmapFile,
count: usize,
first_pos: LSize,
_t: Option<Arc<T>>, // PhantomData replacement
_t: PhantomData<Arc<T>>,
}
impl<T> Reader<T>
@ -157,7 +158,7 @@ where
mmap,
count,
first_pos,
_t: None,
_t: PhantomData,
})
}