diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-04-12 02:40:14 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-04-12 02:40:14 +0000 |
commit | b28ee8b33149385549f08fc009691773777180f5 (patch) | |
tree | ebb3a5291dd0439aed7f8651d6ea30c5ddf49c5e /wiretap/file_wrappers.h | |
parent | e5fe0128d75998d5bd8fc2342e3df8d03240641d (diff) |
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
Diffstat (limited to 'wiretap/file_wrappers.h')
-rw-r--r-- | wiretap/file_wrappers.h | 2 |
1 files changed, 2 insertions, 0 deletions
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; |