Skip to content

Implement BufRead/Write for en/decoders alongside Read/Write  #384

@chernoivanenkoofficial

Description

@chernoivanenkoofficial

Hello.

Have been using deflate for encoding/decoding various moderatly sized data (under 5KB), where I need to parse some encoded heading variabely-sized metadata first.

Have been wondering, if there is any strong reason as to why encoders and decoders do not implement BufRead/Write, if internal implementations certainly use buffered IO.

Even though files in question are small, they can quickly bloat in numbers, and the neccessity of repeatedly either allocating in-memory raw buffers on heap or wrapping decoder/incoder in BufReaders/Writers (which, while enabling more "lazy", "stream-fashioned" approach, still do those same allocations internally) seems concerning perfromance-wise.

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