in Education by
I have a file that contains an embedded file that is compressed using zlib. I know where the compressed file starts within the main file and I have the decompressed file size, but don't know where the compressed file ends. My goal is to extract the compressed file from its containing file and save it as its own file. Given the start location of the compressed file and the decompressed file size, is there anything that will tell me the compressed file size or where the compressed file ends? Presently I pass from the zlib header to EOF into a inflate function. This works fine for smaller files as the inflate function will discard any data after the end of the compressed file and only return me the decompressed bytes. However for larger files where the compressed file is located near the top of the file, my system does not have enough memory to pass the majority of the file into the inflate function. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
A zlib stream is self-terminating. You find the compressed length by decompressing and seeing how many bytes have been consumed when it finishes. You mention something about not having enough memory. The main zlib functions process a piece of the stream at a time, which are the inflate* functions for decompression. Read zlib.h.

Related questions

0 votes
    ________ opens a connection to a file compressed with gzip. (a) url (b) gzfile (c) bzfile (d) file ... and Operations of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    A bundled package is a package that's been compressed into a ______ file. (a) Double (b) Triple (c) ... Regression of R Programming Select the correct answer from above options...
asked Feb 10, 2022 in Education by JackTerrance
0 votes
    1. What is the commonest type of compressed digital audio file ? (c) .mp3 (d) .wav (b) .flac (a) ... to download and poorer quality Select the correct answer from above options...
asked Dec 15, 2021 in Education by JackTerrance
0 votes
    when you insert an excel file into a word document the data is _______ a) hyperlinked b)linked c)embedded d)placed ina word document Select the correct answer from above options...
asked Dec 13, 2021 in Education by JackTerrance
0 votes
    If I issue the find command as follows: find . -name *.ear It prints out: ./dir1/dir2/earFile1. ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 26, 2022 in Education by JackTerrance
0 votes
    I want to get the size of an http:/.../file before I download it. The file can be a webpage ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    How can we get the size of specified file? (a) capacity(path) (b) size(path) (c) length(path) ( ... Autoboxing & Miscellaneous of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    How can we get the size of specified file? (a) capacity(path) (b) size(path) (c) length(path) ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of the following terms refers to the use of compressed gasses to drive (power) the robot device? (a) ... c) piezoelectric (d) photosensitive Please answer the above question....
asked Oct 22, 2022 in Education by JackTerrance
0 votes
    Which of the following terms refers to the use of compressed gasses to drive (power) the robot device? (a) ... c) piezoelectric (d) photosensitive Please answer the above question....
asked Oct 2, 2022 in Education by JackTerrance
0 votes
    I am not too familiar with .NET desktop applications (using Visual Studio 2005). Is it possible to have ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    I am not too familiar with .NET desktop applications (using Visual Studio 2005). Is it possible to have ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    I am not too familiar with .NET desktop applications (using Visual Studio 2005). Is it possible to have ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    I am not too familiar with .NET desktop applications (using Visual Studio 2005). Is it possible to have ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    Bitmaps can be used as a compressed storage mechanism at the leaf nodes of ________ for those values that ... , Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
...