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

InputFilter, OutputFilter overlay for the Darwin Compression stream API #21939

Merged
merged 8 commits into from Jan 18, 2019

Conversation

ebainville
Copy link
Contributor

Adds Swift overlay for the Darwin Compression stream API.

Defines enums to encapsulate the C constants and errors:
enum Algorithm { lzfse, zlib, lz4, lzma }
enum FilterOperation { compres decompress }
enum FilterError : Error { FilterInitError FilterProcessError WriteToFinalizedFilter ReadCountInvalid }

Two classes encapsulating compression_stream:
class OutputFilter, where we write input data to the filter, and the compressed/decompressed output is sent to a closure
class InputFilter, where we read compressed/decompressed data from the filter, and the input is received from a closure

Added the corresponding test in test/stdlib.

@ebainville
Copy link
Contributor Author

@swift-ci Please test

stdlib/public/Darwin/Compression/Compression.swift Outdated Show resolved Hide resolved
stdlib/public/Darwin/Compression/Compression.swift Outdated Show resolved Hide resolved
stdlib/public/Darwin/Compression/Compression.swift Outdated Show resolved Hide resolved
stdlib/public/Darwin/Compression/Compression.swift Outdated Show resolved Hide resolved
stdlib/public/Darwin/Compression/Compression.swift Outdated Show resolved Hide resolved
stdlib/public/Darwin/Compression/Compression.swift Outdated Show resolved Hide resolved
test/stdlib/Compression.swift Outdated Show resolved Hide resolved
test/stdlib/Compression.swift Outdated Show resolved Hide resolved
Copy link

@bob-wilson bob-wilson left a comment

Choose a reason for hiding this comment

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

I don't have much to add here, except that perhaps the Compression overlay should be added to the list of overlays in utils/find-overlay-deps-closure.sh.

moiseev and others added 2 commits January 17, 2019 09:05
@moiseev
Copy link
Contributor

moiseev commented Jan 17, 2019

@swift-ci Please smoke test

@moiseev
Copy link
Contributor

moiseev commented Jan 17, 2019

@swift-ci Please smoke test

@moiseev
Copy link
Contributor

moiseev commented Jan 17, 2019

@swift-ci Please smoke test

@moiseev moiseev merged commit fce2c19 into apple:master Jan 18, 2019
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

6 participants