mathiasbynens / small

Smallest possible syntactically valid files of different types
https://mathiasbynens.be/notes/minimal-html
1.93k stars 184 forks source link

better PNG files, fix WebP #101

Open landfillbaby opened 5 years ago

landfillbaby commented 5 years ago

changed IDAT zlib header to max compression level, min decompression memory truncated a further 4 bytes (the zlib adler32 sum) added 2nd truncated version with IDAT length header 6 instead of 10 to account for truncation being inside the chunk now, same size but different error, one example i found that needs this is GIMP (both are ignored by most decoders anyway), not sure what the rules are here (i meant to do this pr like a year ago and just found the files again)

landfillbaby commented 2 years ago

update: there are 28-byte WebPs. example: cwebp -z 9 of a single null RGBA pixel. webps.zip

TPS commented 2 years ago

Also, there's an updated c.c, apparently