100-days-of-rust/Week-07/Day-47_Zip-It/README.md
2023-03-23 21:14:34 -04:00

1.1 KiB

Zip It!

Most data compression algorithms are pretty complex.

But they all have in common that they are taking data that is repeating and only store it once and have a system of knowing how to uncompress them (putting the repeated segments back in place).

Objective

Design your own data compress and uncompress techniques. Create these two functions.

compress function signature:

  • input parameter sourceFilename with the source filename to compress
  • input parameter targetFilename with the target filename compressed

The compress function should generate a targetFilename file, compressed.

uncompress function signature:

  • input parameter sourceFilename with the compressed source filename
  • input parameter targetFilename with the target filename uncompressed

The compress function should generate a targetFilename file, uncompressed.

Notes

  • It is OK if not every type of input data is capable of compression, but on the tests, it is important to garantee the generated compressed file is smaller than the original and also garantee the uncompress process, from a compressed file to its uncompressed, original version.