Skip to content
  • Andy Green's avatar
    upng: rewrite for stateful stream decode · f8f849f2
    Andy Green authored
    Add a rewritten version of upng that decodes staefully line by line, and so
    does not require a bitmap buffer for the output.  This compares to original
    upng approach that needs heap allocations for the input, the whole output
    and intermediate allocations.
    
    Instead of buffers for input, decompression and output, it only allocates
    2 x lines of RGBA pixels (ie, a few KB), and 32KB of decompressed data for
    backward references in the decoder, and decodes as needed into the 2-line
    buffer to produce line rasterized results.  For a 600px width PNG, this is
    just 40KB heap for the duration.
    f8f849f2
This project is licensed under the Apache License 2.0. Learn more