makl11 / zipper.js Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I want to be able to use the library in all environments mentioned in the title
crc32
function)
window
objectZipping a 16GB file leads to over 10GB ram usage
I want to look into improving the performance of the zip generation.
Some first ideas are:
Uint8Array
s are potentially created (allocated) many times and create even more intermediate arrays during the creation process. I think there is potential to cut the number of allocations / object creations segnificantlyZipentry.data
into several chunks, when it's a Uint8Array
ReadableStreamBYOBReader
, because "it is used for efficient copying from underlying sources [...], such as files" and does zero-copy reading, implying that reading the stream diffrently involves copying data aroundWays I want to profile the performance are:
Atleast the Zipper
class should have some documentation
I want to add some tests to make future refactorings easier. Mainly, I want unit tests for the different header and directory sections of the zip format. Also the existing index.test.js
is more of a demo than an actual test and thus needs refactoring
index.test.js
into an actual test#encodeNumber
method#dateToDOSTime
method#generateLocalFileHeader
method#generateDataDescriptor
method#generateCentralDirectoryFileHeader
method#generateZip64EndOfCentralDirectoryRecord
method#generateZip64EndOfCentralDirectoryLocator
method#generateEndOfCentralDirectoryRecord
methodpredictSize
methodThe idea behind this option is to enable resumable downloads of this the generated zip using HTTP range requests. This is supposed to allow users to continue downloading the generated zip after i.e. a network error.
Using JSDoc was a fun experiment, but I still prefer Typescript
With the correct tsconfig.json
, type checking works as expected, no need to migrate to typescript
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.