[pbs-devel] [PATCH proxmox-backup v2 0/5] add compression to api/static files

Dominik Csapak d.csapak at proxmox.com
Thu Apr 1 16:11:18 CEST 2021


by using the flate2 crate

this series will also help send a simpler version of my zip deflate
encoder patch (i'll send that in the next few days)

changes from v1:
* drop file caching and related functions
* change type of `inner` in DeflateEncoder from
   Stream<Item = Result<Bytes, io::Error>> + Unpin
  to
   Stream<Item = Result<Into<Bytes>, io::Error>> + Unpin
  so that we can use it with the AsyncStreamReader (for files)

Dominik Csapak (5):
  tools: add compression module
  tools/compression: add DeflateEncoder and helpers
  server/rest: add helper to extract compression headers
  server/rest: compress api calls
  server/rest: compress static files

 Cargo.toml               |   1 +
 src/server/rest.rs       | 129 ++++++++++++++++++----
 src/tools.rs             |   1 +
 src/tools/compression.rs | 228 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 336 insertions(+), 23 deletions(-)
 create mode 100644 src/tools/compression.rs

-- 
2.20.1






More information about the pbs-devel mailing list