path-with-zip

Ex version of PathBuf in Rust.

Example: Reading a file in a zip archive

```rust use pathwithzip::PathBufWithZip;

let path = "test.zip///test/test.txt";

// The error type is zip::result::ZipError, which includes std::io::Error. let bytes: Vec = PathBufWithZip::from(path).readbytesdirectly().unwrap(); Another way: rust use pathwithzip::PathBufWithZip;

let path = "test.zip"; let pathbufwithzip = PathBufWithZip::from(path);

let mut ziparchive = pathbufwithzip.openarchive().unwrap(); // OR // let mut ziparchive = pathbufwithzip.openarchiveintomemory().unwrap();

let bytes: Vec = pathbufwithzip.readbytes(Some(&mut ziparchive)).unwrap(); ```

Example: Reading a file like using PathBuf

```rust use pathwithzip::PathBufWithZip;

let path = "test.zip";

let bytes: Vec = PathBufWithZip::from(path).readbytesdirectly().unwrap(); Another way: rust use pathwithzip::PathBufWithZip;

let path = "test.zip"; let pathbufwithzip = PathBufWithZip::from(path);

let bytes: Vec = pathbufwithzip.read_bytes(None).unwrap(); ```