* Added: bz3_memory_needed API.
* Added: bz3_decode_block_bound
* Renamed: bz3_decode_bound -> bz3_decode_block_bound in documentation
* Updated: libbz3.h to specify that it is a frame that is being compressed here.
* Reworked how the fuzzer script works. Can now generate its own input for easier debugging.
* Added: Multithreading to fuzz tutorial.
* Added: 010editor template for fuzzer input.
* Improved: Ignore the AFL Input/Outputs in .gitignore
* Added a note saying `afl-whatsup` is not realtime.
* Fixed: Variable name in embedded hex editor script.
* Added: Note on where to find crashing test case :3
* Added: Integration for bz3_decode_block_bound in bz3_decode_block
* Added: Guide for fuzzing with address sanitizer.
* Fixed: Wrong branch in binary template of fuzz.c
* Improved: Description in bz3_decode_block_bound
* Revert: data_size should not compare with bz3_decode_block_bound
* Removed: `bz3_decode_block_bound` API.
* Added: BZ3_ERR_DATA_SIZE_TOO_SMALL when bz3_decode_block is called with insufficient buffer.
* Implemented: Additional bounds checks in `bz3_decode_block` and `bz3_orig_size_sufficient_for_decode` API
* Adjusted: Old fuzz script now named fuzz-decompress. Enforce includes from local files, not system.
* Fixed: Bad quote usage in bz3_decode_block
* Added: Standard fuzzer inputs.
* Fixed: fuzz failures in decode_block and added a new fuzzer script for block decodes
* Added: Sanity check that the user provided a valid compressed data size to bz3_decode_block
* Changed: bz3_memory_needed -> bz3_min_memory_needed
* Added: Round Trip Fuzzer
* Fixed: Possible out of bounds read in `lzp_decode_block`. Mark exit branches as unlikely.
* Update comment
---------
Co-authored-by: Kamila Szewczyk <27734421+kspalaiologos@users.noreply.github.com>
* Fixed shift direction for crc32sum()
ref. #105
ref. commit 7a8d35b161
* Add a `.bz3` reference file to test
The `examples/shakespeare.txt.bz3` file was created by the following command
```console
% ./bzip3 -e -b 4 < examples/shakespeare.txt > examples/shakespeare.txt.bz3
```
At this time bzip3 is version 1.1.0 and running on FreeBSD 13.2 amd64.
considering that many issues were reported with lack of robustness of the example code, I have decided to remove it. while it was meant to initially be a demonstration of the bzip3 APIs, i do not want to turn it into a demonstration of how to use the C standard library. to guard the code against all sorts of errors (I/O, allocation) we would need to essentially triple the size of the example code for no reason in particular. one needs to check all I/O operations - fopen, fflush, fread, fwrite, fseek. you need to check malloc return values, need to check file headers, need to sync files using UNIX apis. then a handler for each case to display an error message and `exit`. as such, when the size of the "example" will grow 3 times and become just useless stuff completely irrelevant to someone who's using the library, it will stop serving its purpose.
the example code was not a part of the library, but to stop it from drawing so much attention, it has been removed.