streamly-zip: Stream data from zip archives using the streamly library.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Please see the README on GitHub at https://github.com/shlok/streamly-zip#readme


[Skip to Readme]

Properties

Versions 0.0.1, 0.0.1
Change log ChangeLog.md
Dependencies base (>=4.14 && <5), bytestring (>=0.10 && <0.12), containers (>=0.6 && <0.7), streamly (>=0.10.0 && <0.11), streamly-core (>=0.2.0 && <0.3) [details]
License BSD-3-Clause
Copyright 2024 Shlok Datye
Author Shlok Datye
Maintainer sd-haskell@quant.is
Category Archive, Codec, Streaming, Streamly
Home page https://github.com/shlok/streamly-zip
Bug tracker https://github.com/shlok/streamly-zip/issues
Source repo head: git clone https://github.com/shlok/streamly-zip
Uploaded by shlok at 2024-08-13T22:39:05Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for streamly-zip-0.0.1

[back to package description]

streamly-zip

Stream data from zip archives using the Haskell streamly library.

Comparison with streamly-archive

This library was created because libarchive (which streamly-archive relies on) does not seem to have support for jumping to specific files even when the format supports it.

Requirements

Install libzip on your system.

Quick start

module Main where

import qualified Data.ByteString as B
import Data.Function
import qualified Streamly.Data.Fold as F
import qualified Streamly.Data.Stream.Prelude as S
import Streamly.External.Zip

main :: IO ()
main = do
  -- Obtain an archive.
  z <- openZip "/path/to/archive.zip" []

  -- Output a particular file to stdout.
  S.unfold unfoldFileAtPath (z, [], "file.txt")
    & S.mapM B.putStr
    & S.fold F.drain