From b28ee8b33149385549f08fc009691773777180f5 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 12 Apr 2011 02:40:14 +0000 Subject: From Jakub Zawadzki: speed up random access to gzipped files, as per the zran.c example in the zlib source. This means that problems in the file's contents might not be reported when a packet is read, as long as there's no problem in the contents of the file up to the last bit of compressed data for the packet; we now check for errors after finishing the sequential read of the file, at least in some programs, so that shouldn't be an issue (the other programs need to be changed to do so as well). This is necessary in order to be able to read all the packets we saw in the sequential pass; it also lets us get a few more packets from truncated files in some cases. svn path=/trunk/; revision=36577 --- wiretap/file_wrappers.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'wiretap/file_wrappers.h') diff --git a/wiretap/file_wrappers.h b/wiretap/file_wrappers.h index 51d655a25a..8f8b68f144 100644 --- a/wiretap/file_wrappers.h +++ b/wiretap/file_wrappers.h @@ -37,6 +37,8 @@ extern char *file_gets(char *buf, int len, FILE_T stream); extern int file_eof(FILE_T stream); extern void file_clearerr(FILE_T stream); +extern void file_set_random_access(FILE_T stream, gboolean random, GPtrArray *seek); + #ifdef HAVE_LIBZ typedef struct wtap_writer *GZWFILE_T; -- cgit v1.2.1