From 08c942f8b7a73d6c997146a25be80f83fca4277b Mon Sep 17 00:00:00 2001 From: Joel Uckelman <juckelman@strozfriedberg.co.uk> Date: Wed, 5 Feb 2020 18:03:16 +0000 Subject: [PATCH] zlib_inflate is used in more than one source file, so it should be in a header. --- tsk/fs/decmpfs.c | 2 +- tsk/fs/decmpfs.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tsk/fs/decmpfs.c b/tsk/fs/decmpfs.c index 1964f2bfc..7e92a7775 100644 --- a/tsk/fs/decmpfs.c +++ b/tsk/fs/decmpfs.c @@ -34,7 +34,7 @@ * @param bytesConsumed -- return of the number of input bytes of compressed data used. * @return 0 on success, a negative number on error */ -static int +int zlib_inflate(char *source, uint64_t sourceLen, char *dest, uint64_t destLen, uint64_t * uncompressedLength, unsigned long *bytesConsumed) // this is unsigned long because that's what zlib uses. { diff --git a/tsk/fs/decmpfs.h b/tsk/fs/decmpfs.h index b14688903..4ab40fd18 100644 --- a/tsk/fs/decmpfs.h +++ b/tsk/fs/decmpfs.h @@ -45,6 +45,13 @@ typedef enum { #define COMPRESSION_UNIT_SIZE 65536U +extern int zlib_inflate(char* source, + uint64_t sourceLen, + char* dest, + uint64_t destLen, + uint64_t* uncompressedLength, + unsigned long* bytesConsumed); + extern int decmpfs_file_read_zlib_attr(TSK_FS_FILE* fs_file, char* buffer, TSK_OFF_T attributeLength, -- GitLab