pipes-cellular-csv-1.0.0.0: Efficient pipes-based cellular CSV codec

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

Pipes.CSV.Encoder

Description

Streaming CSV file decoder compliant with RFC 4180. All fields are quoted except for short fields consisting entirely of “safe” ASCII characters, i.e., printable 7-bit characters other than quote and comma. The maximum length of an unquoted field is supplied explicitly to the encoder, which allows us to decide whether a given field requires quoting without unbounded lookahead.

Synopsis

Documentation

encodeCSV :: Monad m => Int -> Pipe (Cell ByteString.ByteString) ByteString.ByteString m () Source

encodeCSV n is an infinite pipe that converts a stream of cells into a fragmented strict representation of of a CSV file, unconditionally quoting any field values with length greater than n.

encodeLazyCSV :: Monad m => Int -> Pipe (Cell Lazy.ByteString) ByteString.ByteString m () Source

encodeLazyCSV n is an infinite pipe that converts a stream of cells into a fragmented lazy representation of of a CSV file, unconditionally quoting any field values with length greater than n.