Giter VIP home page Giter VIP logo

zipper.js's People

Contributors

makl11 avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

zipper.js's Issues

Perfromance profiling / optimization

I want to look into improving the performance of the zip generation.

Some first ideas are:

  • Some mostly static Uint8Arrays 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 segnificantly
  • Check chunk sizes for input and output streams
  • Look into splitting Zipentry.data into several chunks, when it's a Uint8Array
  • Look into 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 around

Ways I want to profile the performance are:

Add testing

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

  • Refactor the current state of index.test.js into an actual test
  • Unit test the #encodeNumber method
  • Unit test the #dateToDOSTime method
  • Unit test the #generateLocalFileHeader method
  • Unit test the #generateDataDescriptor method
  • Unit test the #generateCentralDirectoryFileHeader method
  • Unit test the #generateZip64EndOfCentralDirectoryRecord method
  • Unit test the #generateZip64EndOfCentralDirectoryLocator method
  • Unit test the #generateEndOfCentralDirectoryRecord method
  • Unit test the predictSize method

Embrace JSDoc

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.