profile
viewpoint

akkumar/hbasene 108

HBase as the backing store for the TF-IDF representations for Lucene

akkumar/jreversepro 82

JReversePro Java Decompiler

akkumar/maven-hadoop 23

Maven Plugin to submit hadoop jobs

akkumar/ant-doxygen 5

Ant Task for Doxygen

akkumar/akkumar 0

Config files for my GitHub profile.

akkumar/archive 0

Dart library to encode and decode various archive and compression formats, such as Zip, Tar, GZip, ZLib, and BZip2.

akkumar/DefinitelyTyped 0

The repository for high quality TypeScript type definitions.

akkumar/irispixel-ui 0

IrisPixel Framework examples

akkumar/ngx-easypiechart 0

angular 4/5/6/7 module for easypiechart

akkumar/react-svelte 0

Use Svelte components inside a React app

PR opened brendan-duncan/archive

fix: add a listener interface to ZipDecoder to deal with large files

ZipDecoder contains a 'decodeBuffer' method to deal with (reasonably !!) large files by taking in a stream.

But to make it more complete , it should have a listener interface to deal with the files one at a time as opposed to uncompressing everything in memory (and running out of it ).

Of course, it is applicable only if the zip file is large and contains a bunch of relatively smaller individual files so they can be processed without bringing all of them into memory at once.

New type added:


/// FnArchiveFile is the callback invoked when the zip decoder iterates through the archive.
typedef FnArchiveFile = void Function(ArchiveFile file);

New method onDecodeBuffer added to ZipDecoder

  void onDecodeBuffer(
    InputStreamBase input,
    FnArchiveFile fnArchiveFile, {
    bool verify = false,
    String? password,
  }) ;

The above new method is very similar to the original decodeBuffer method , except that it takes a listener ( FnArchiveFile ) as the second argument.

  Archive decodeBuffer(
    InputStreamBase input, {
    bool verify = false,
    String? password,
  }) 

This should address large files to some extent.

Let me know your comments regarding the same.

+17 -4

0 comment

2 changed files

pr created time in 2 months

create barnchakkumar/archive

branch : listener

created branch time in 2 months

fork akkumar/archive

Dart library to encode and decode various archive and compression formats, such as Zip, Tar, GZip, ZLib, and BZip2.

fork in 2 months

more