Added test script; tidied and documented

The test script combines the sources then builds and runs an example. A futher example is built if the Emscripten compiler is available on the system. Documentation covers building.
This commit is contained in:
Carl Woffenden
2019-08-27 15:36:06 +02:00
parent 7c6fa81579
commit a57de4ac89
7 changed files with 94 additions and 23 deletions
+6 -2
View File
@@ -1,8 +1,12 @@
# Single File Zstandard Decompression Library
Create the file using the shell script:
The script `combine.sh` creates an _amalgamted_ source file that can be used with out without `zstd.h`. This isn't a _header-only_ file but it does offer a similar level of simplicity when integrating into a project.
Create `zstddeclib.c` from the Zstd source using:
```
cd zstd/contrib/declib
./combine.sh -r ../../lib -r ../../lib/common -r ../../lib/decompress -o zstddeclib.c zstddeclib-in.c
```
Then add the resulting file to your project (see the [test sources](tests) for examples).
Then add the resulting file to your project (see the [example files](examples)).
`build.sh` will run the above script then compile and test the resulting library.