-
Couldn't load subscription status.
- Fork 1.4k
Add ZPipeline.autoGunzip #7914
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
Add ZPipeline.autoGunzip #7914
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Left a coupe of minor comments.
| } | ||
|
|
||
| private[stream] trait ZPipelinePlatformSpecificConstructors { | ||
| private val gzipMagic: zio.Chunk[Byte] = zio.Chunk(0x1f.toByte, 0x8b.toByte) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just prefix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also inline this into the implementation since it is only used in one place.
| private[stream] trait ZPipelinePlatformSpecificConstructors { | ||
| private val gzipMagic: zio.Chunk[Byte] = zio.Chunk(0x1f.toByte, 0x8b.toByte) | ||
|
|
||
| def autoGunzip[Env]( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gunzipAuto?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to add some documentation about what this does.
Allows a user who has a ZStream that may or may not be gzipped to easily operate on the uncompressed version.