Conversation
This takes the c code from commit cbc5225d38ba65a1cd77701e91a9f45f3cc825ba available at facebook/zstd@cbc5225 3cc825ba The error list has been updated to reflect the C code
Unfortunately, since Go 1.6, you can't have a C object with a go pointer inside it, so we have to either use `GODEBUG=cgocheck=0` or do memory management ourselves. I guess we will want to do mem management ourselves because we can't ask users to compile their program with `cgocheck=0`
This was referenced Feb 22, 2017
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Straightforward C files update is available at this commit: 45f7613
Unfortunately that triggers some warnings on ZBUFF deprecation:
I updated the bindings to the new interface here: 8ec87b6
Unfortunately (😞), this makes us use go pointers inside a C struct (
ZSTD_inBuffer&ZSTD_outBuffer) so this needs compilation withGODEBUG=cgocheck=0We will have to do memory management ourselves if we want to update to the new bindings.
However if you want to give it a go and need zstd 1.1.3, 45f7613 should be pretty stable (no bindings changes, it just add deprecation warnings)
Benchmarks (with mr):