| Crates.io | include-bytes-zstd |
| lib.rs | include-bytes-zstd |
| version | 0.1.0 |
| created_at | 2023-02-17 09:17:23.201454+00 |
| updated_at | 2023-02-17 09:17:23.201454+00 |
| description | Includes a file with zstd compression |
| homepage | https://github.com/daac-tools/include-bytes-zstd |
| repository | https://github.com/daac-tools/include-bytes-zstd |
| max_upload_size | |
| id | 787410 |
| size | 4,136 |
include_bytes_zstd!()This library provides a macro to include a file with zstd compression.
This macro can be used like std::include_bytes!, but the byte array is compressed by the zstd
crate. The included data will be decompressed by the ruzstd
crate in runtime and returned as a Vec<u8>.
This macro performs the decompression each time it is called.
input.txt:
This is a test.
Rust code:
let data = include_bytes_zstd::include_bytes_zstd!("test-resources/input.txt", 19);
assert_eq!(b"This is a test.\n", data.as_slice());
Licensed under either of
at your option.
See the guidelines.