ord icon indicating copy to clipboard operation
ord copied to clipboard

Add brotli compression for text-based inscriptions

Open terror opened this issue 2 years ago • 2 comments

TODO:

  • [x] Add more tests
  • [ ] Have users configure compressor parameters?

terror avatar Feb 13 '23 02:02 terror

You can add a bool to Media::TABLE, true for text formats and false for non text formats, which determines what should be compressed. Only text should be compressed for now.

casey avatar Feb 13 '23 02:02 casey

Only text should be compressed for now.

I had tested the majority of our existing MIME types to verify which would benefit from brotli. The majority show gains with the 3d types being exceptionally well suited for compression. image

Psifour avatar Feb 13 '23 04:02 Psifour

I hope this will be merged someday 🙏

nammaki avatar Mar 23 '23 18:03 nammaki

TODO (to get this shipped):

  • [ ] Switch to dropbox rust brotli implementation (https://docs.rs/brotli/latest/brotli/)
  • [ ] Handle these tests:
    • [ ] subcommand::server::tests::responses_are_brotlied
    • [ ] subcommand::server::tests::text_preview
    • [ ] subcommand::server::tests::text_preview_returns_error_when_content_is_not_utf8
    • [ ] subcommand::server::tests::text_preview_text_is_escaped

terror avatar Nov 15 '23 03:11 terror