istream-lz4.c revision d868a04630bd7bfe9c1543a7c3f68703b3e276e4
294N/A/* Copyright (c) 2013-2016 Dovecot authors, see the included COPYING file */ 1337N/A "lz4 max chunk size too large (%u > %u)",
789N/A /* read the whole compressed chunk into memory */ 294N/A /* if we already have max_buffer_size amount of data, fail here */ 294N/A /* allocate enough space for the old data and the new 294N/A decompressed chunk. we don't know the original compressed size, 789N/A so just allocate the max amount of memory. */ 789N/A /* have to seek backwards */ 877N/A /* seeking backwards within what's already cached */ 869N/A /* read and cache forward */ 872N/A /* some failure, we've broken it */ 994N/A /* unexpected EOF. allow it since we may just 869N/A want to check if there's anything.. */ 1336N/A /* when exact=FALSE always return the parent stat's size, even if we 1336N/A know the exact value. this is necessary because otherwise e.g. mbox 1336N/A code can see two different values and think that a compressed mbox 789N/A /* a compressed file doesn't change unexpectedly, 789N/A don't clear our caches unnecessarily */