Skip to content

proposal: image/png: add HuffmanOnly compression levels #59023

@HyeockJinKim

Description

@HyeockJinKim

Problem:

The HuffmanOnly option, which only performs Huffman encoding, is supported by the zlib library, but not by png using zlib.

Solution

Add a HuffmanOnly const to image/png.

Golang developer can pass the HuffmanOnly option with the code below and get a PNG with only huffman encoding.

png.Encoder{
    CompressionLevel: png.HuffmanOnly,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Incoming

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions