Skip to content

PureByteSource instance for Builders. #261

@piyush-kurur

Description

@piyush-kurur

Starting from version 0.10.0.0, the Builder type is available
together with the bytestring library. A PureByteSource for builders
would be great.

  • Points to check, is there a (stable) way to write out the contents
    of the builder to a given buffer?

Some description of the problem.

Builder got into the bytestring library from the Blazebuilder world
and is very fast to build lazy bytestring. Lazy bytestrings are essentially
a list of chunks each of which are strict bytestrings. The Builder infrastructure
makes sure that each chunk is reasonably large (fits in the l1 cache) instead of
making a lot of small chunks.

Of course a trivial way to have a PureByteSource instance is to
convert to Lazy ByteString. When computing a hash or encrypting using
a cipher, I believe there should be an internal way to spill the data
directly into a buffer and process it. This should be faster.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions