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

fs2 gunzip doesn't support concatenated gzip files #3503

Open
dimitriho opened this issue Nov 19, 2024 · 0 comments
Open

fs2 gunzip doesn't support concatenated gzip files #3503

dimitriho opened this issue Nov 19, 2024 · 0 comments
Labels

Comments

@dimitriho
Copy link

Steps to reproduce:

  • generate a compressed file
echo foo > foo; echo bar > bar; gzip -c foo bar > foobar.gz
  • run the following code
import cats.effect.IO
import cats.effect.unsafe.implicits.global
import fs2.compression.Compression

import java.io.FileInputStream

fs2.io
  .readInputStream(
    IO(new FileInputStream("foobar.gz")),
    1024,
  )
  .through(Compression[IO].gunzip(1024))
  .flatMap(_.content)
  .compile
  .drain
  .unsafeRunSync()

This code snippet throws a java.util.zip.ZipException: Content failed CRC validation.

I expect it to run without error.

Tested on fs2 3.11.0

My gzip version is Apple gzip 430.140.2

@dimitriho dimitriho added the bug label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant