pipes-cellular-0.0.0.1: Pipes-based combinators for cellular data processing

Copyright© 2015 Patryk Zadarnowski <pat@jantar.org>
LicenseBSD3
Maintainerpat@jantar.org
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Pipes.ByteString.Chunks

Description

When binary data is streamed through a pipe, it's often partitioned arbitrarily into packets with no semantic significance, beyond facilitation of processing in constant space. This is similar to the chunking mechanism within lazy bytestrings, and, accordingly, it's often convenient to unify the two mechanisms, by converting between pipes over lazy bytestrings and pipes over strict chunks these bytestrings. This module provides efficient implementations of these conversions.

Synopsis

Documentation

toChunks :: Monad m => Pipe Lazy.ByteString ByteString.ByteString m r Source

An infinite pipe that converts lazy bytestring input into strict bytestring chunk output.

fromChunks :: Monad m => Int64 -> Int64 -> Pipe ByteString.ByteString Lazy.ByteString m r Source

An infinite pipe that converts strict bytestrings into lazy bytestrings with the specified minimum and maximum size, without copying any data.