Skip to content

Decompression from File Handler #41

@proconsule

Description

@proconsule

I found out that is impossible to decompress form a file handler reading chunks.

I have a very big file that have compressed data starting from an offset.
i have a file handler and seek to the start of compressed data
it will be very very useful for me (and for many others i think) a function that can get the file handler and read chunks of data outputing the uncompressed data

like

$this->fh = fopen("FILE",'r');
fseek($this->fh,$this->offset); //the start of compressed data

$zstd_object = zstd_uncompress_handler($this->fh);

while(EOF or some condition){
$outdata = $zstd_object->uncompress($chunksize); //just an idea of object function
// Data here can be printed or anything else (for a on the fly download and so on)
}

This can be done and you think can be usefull? (if so i'll use for sure on my project)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions