Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: separate Compressor and Decompressor #11

Merged
merged 1 commit into from
Aug 16, 2024
Merged

feat: separate Compressor and Decompressor #11

merged 1 commit into from
Aug 16, 2024

Conversation

a10y
Copy link
Contributor

@a10y a10y commented Aug 16, 2024

As part of implementing the vortex FSSTArray, we should separate out the data for compression (symbol table, hash table, codes_twobyte vector) and decompression (just the symbol table).

This PR separates the previous SymbolTable type into two types, a Compressor and a Decompressor<'a>. A Compressor can be trained on a sample text, as before, but it does not have decompression methods. Those are now on a new Decompressor type. Decompressors can either be built directly from a Compressor, or you can build one by directly wrapping a &[Symbol]. Compressors allow slice access to the symbol table as well, e.g. for serialization

@@ -7,6 +7,9 @@ license = "Apache-2.0"
repository = "https://github.com/spiraldb/fsst"
edition = "2021"

[lib]
name = "fsst"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nicer than typing use fsst_rs::...

@a10y a10y changed the title separate Compressor and Decompressor feat: separate Compressor and Decompressor Aug 16, 2024
@a10y a10y merged commit 812a42d into develop Aug 16, 2024
2 checks passed
@a10y a10y deleted the aduffy/new-api branch August 16, 2024 18:16
@github-actions github-actions bot mentioned this pull request Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant