Specifically this adds support for the following options:
- LZ4_ALIGN_TEST
- LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION
- LZ4_DISTANCE_MAX
- LZ4_FAST_DEC_LOOP
- LZ4_FORCE_SW_BITCOUNT
- LZ4_FREESTANDING
- LZ4_USER_MEMORY_FUNCTIONS
- compiling ossfuzz targets
- compiling more test targets
- registering some tests
* replace assert with test for LZ4F_uncompressedUpdate
* update documentation to incldue correct docstring
* remove unecessary entry point
* remove compress_linked_block_mode from fuzzing test
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
The meson build had gotten a little out of hand. It needed to be cleaned
up and have its errors fixed. This should enable lz4 to switch to Meson
at any time should the need ever arise.
run_command() in development versions of meson will warn when the
`check: ` kwarg is not specified. At the same time, lz4 has some gnarly
code to manually check the return code and raise an error if it failed.
Kill two birds with one stone, by making run_command inherently raise a
fatal error when erroring out, then proceeding in the knowledge that it
must have succeeded.
This commit adds a snapcraft.yaml file to allow lz4
to be distributed as a snap (see https://snapcraft.io/
for more info on snaps).
Building the Snap
-----------------
To build the snap simply install snapcraft and build the
snap e.g. on Ubuntu by doing:
$ sudo apt install snapcraft
$ cd contrib; snapcraft
This will build a snap that can be published [1] to
e.g. https://snapcraft.io/lz4
If you want to test the snap before publishing you
can do:
$ snap install <snapname>.snap --dangerous
And that will install it on your local host. You
will then have lz4 as a command to run.
Installing the Snap
-------------------
Once published and released in the snapstore your snap
can be installed on any platform that supports snaps
by doing:
snap install lz4
[1] https://docs.snapcraft.io/releasing-to-the-snap-store