miniz_oxide icon indicating copy to clipboard operation
miniz_oxide copied to clipboard

DecompressorOxide: Serialize state with serde

Open dishmaker opened this issue 10 months ago • 1 comments

DecompressorOxide does implement Clone. So it is possible to 'save' the state and 'restore' it later.

However, state Clone-restore only works during the lifetime of the program.

Following my issue https://github.com/bearcove/rc-zip/issues/99, can we save the state into a JSON (or msgpack) and restore it later?

Example use cases:

  • saving state in the middle of a 100 GB compressed file to allow for some random memory access inside compressed file
  • using zip as a read-only filesystem with Read + Seek.

dishmaker avatar Feb 13 '25 09:02 dishmaker

I'm not entirely clear what you want added, do you want a serde feature that makes DecompressorOxide (and maybe the compressor equivialent and other structs) implement (de/)serialization traits?

oyvindln avatar Feb 16 '25 13:02 oyvindln