X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flibchdr%2Fdeps%2Fzlib-1.2.13%2Fexamples%2Fzran.h;fp=deps%2Flibchdr%2Fdeps%2Fzlib-1.2.13%2Fexamples%2Fzran.h;h=0000000000000000000000000000000000000000;hb=648db22b0750712da893c306efcc8e4b2d3a4e3c;hp=2314125d6e98422cabd9a10fabae894adcd84a65;hpb=e2fb1389dc12376acb84e4993ed3b08760257252;p=pcsx_rearmed.git diff --git a/deps/libchdr/deps/zlib-1.2.13/examples/zran.h b/deps/libchdr/deps/zlib-1.2.13/examples/zran.h deleted file mode 100644 index 2314125d..00000000 --- a/deps/libchdr/deps/zlib-1.2.13/examples/zran.h +++ /dev/null @@ -1,40 +0,0 @@ -/* zran.h -- example of zlib/gzip stream indexing and random access - * Copyright (C) 2005, 2012, 2018 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * Version 1.2 14 Oct 2018 Mark Adler */ - -#include -#include "zlib.h" - -/* Access point list. */ -struct deflate_index { - int have; /* number of list entries */ - int gzip; /* 1 if the index is of a gzip file, 0 if it is of a - zlib stream */ - off_t length; /* total length of uncompressed data */ - void *list; /* allocated list of entries */ -}; - -/* Make one entire pass through a zlib or gzip compressed stream and build an - index, with access points about every span bytes of uncompressed output. - gzip files with multiple members are indexed in their entirety. span should - be chosen to balance the speed of random access against the memory - requirements of the list, about 32K bytes per access point. The return value - is the number of access points on success (>= 1), Z_MEM_ERROR for out of - memory, Z_DATA_ERROR for an error in the input file, or Z_ERRNO for a file - read error. On success, *built points to the resulting index. */ -int deflate_index_build(FILE *in, off_t span, struct deflate_index **built); - -/* Deallocate an index built by deflate_index_build() */ -void deflate_index_free(struct deflate_index *index); - -/* Use the index to read len bytes from offset into buf. Return bytes read or - negative for error (Z_DATA_ERROR or Z_MEM_ERROR). If data is requested past - the end of the uncompressed data, then deflate_index_extract() will return a - value less than len, indicating how much was actually read into buf. This - function should not return a data error unless the file was modified since - the index was generated, since deflate_index_build() validated all of the - input. deflate_index_extract() will return Z_ERRNO if there is an error on - reading or seeking the input file. */ -int deflate_index_extract(FILE *in, struct deflate_index *index, off_t offset, - unsigned char *buf, int len);