jpeddicord / askalono

A tool & library to detect open source licenses from texts
Apache License 2.0
255 stars 25 forks source link

Use zstd over gzip when not compiling for WASM #44

Closed Jake-Shadle closed 5 years ago

Jake-Shadle commented 5 years ago

Issue #, if available: #43

Description of changes: This replaces the use of a gzip with zstd for compression the spdx archive, which results in a much smaller cache/binary, and very slightly faster decompression. This change does not affect WASM however, as zstd is not out of the box compatible with wasm, and a cursory glance didn't show any feature toggles that might be used to make it so, so that WASM path still uses gzip.

I also made a slight change to the LicenseMatch to just return a &str rather than a new String, as well as replace the use of the macro in the analyze pass with a normal closure.

I also fixed some warnings.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

jpeddicord commented 5 years ago

Great changes, thank you! I think this looks good to merge; I'm taking care of my usual Monday fun and will merge this in later today. Don't worry too much about wasm; it's an eventual goal but it's still very experimental as far as askalono is concerned.

Jake-Shadle commented 5 years ago

Cool, no rush!