From 42fcb6656dd9b6c735b09ce61f8ce4e875329c43 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Mon, 7 Jan 2019 01:11:20 -0500 Subject: Compress PNG data in image kcgi never enables compression for FastCGI. --- png.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'png.h') diff --git a/png.h b/png.h index 0df4699..d5fd3f5 100644 --- a/png.h +++ b/png.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018 June McEnroe +/* Copyright (C) 2018, 2019 June McEnroe * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -102,6 +102,12 @@ static inline void pngData(FILE *file, const uint8_t *data, uint32_t len) { pngInt32(file, ~pngCRC); } +static inline void pngDeflated(FILE *file, const uint8_t *data, uint32_t len) { + pngChunk(file, "IDAT", len); + pngWrite(file, data, len); + pngInt32(file, ~pngCRC); +} + static inline void pngTail(FILE *file) { pngChunk(file, "IEND", 0); pngInt32(file, ~pngCRC); -- cgit 1.4.1