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

Compression algorithm changes #7

Merged
merged 3 commits into from
Jun 14, 2023
Merged

Conversation

adam-fowler
Copy link
Owner

@adam-fowler adam-fowler commented Jun 12, 2023

Algorithm is created with configuration (as associated value)
Add new configuration values (compressionLevel, memoryLevel and strategy)
For example

let algorithm = CompressionAlgorithm.gzip(
    configuration: .init(
        windowSize: 15,
        compressionLevel: 9,
        memoryLevel: 9,
        strategy: .huffmanOnly
    )
)

Everything has default values so this can be shortened to

let algorithm = CompressionAlgorithm.gzip()

Also renamed algorithms to gzip, zlib and deflate instead of gzip, deflate and rawDeflate. This mean deflate means something different from what it did.

@jhoughjr
Copy link

Looks perfect to me.

@jhoughjr
Copy link

Do you need anything from me to get this merged? I've got to refactor my alg init anyway so these changes come at the right time.

@adam-fowler adam-fowler merged commit 0223872 into main Jun 14, 2023
4 of 5 checks passed
@adam-fowler adam-fowler deleted the compression-algorithm-changes branch June 14, 2023 14:14
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.

None yet

2 participants