(data: Vec<u8>)
| 18 | |
| 19 | impl ProfileArchive { |
| 20 | pub fn new_compressed_in_memory(data: Vec<u8>) -> Self { |
| 21 | let hash = general_purpose::STANDARD.encode(md5::compute(&data).0); |
| 22 | ProfileArchive { |
| 23 | hash, |
| 24 | content: ProfileArchiveContent::CompressedInMemory { data }, |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | pub fn new_uncompressed_on_disk(path: PathBuf) -> Result<Self> { |
| 29 | let metadata = std::fs::metadata(&path)?; |
nothing calls this directly
no outgoing calls
no test coverage detected