Skip to content

serj-kzv/mozlz4-edit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is it?

mozlz4-edit is an addon (extension), which is a file archiver that can open, edit and save text mozlz4 files.
The mozlz4-edit is developed as an WebExtension addon because a mozlz4 file format is the Mozilla Firefox-based products' format only.

Installation

Click a mozlz4-edit for Firefox link to install.

(The way does not work with new versions of Firefox!) Using without the installation

Note. It seems that the way to run the extension without an installation does not work anymore cause new Firefox versions have restrictions to request local JavaScript files. You can still use the way to run the extension with old versions of Firefox or by installing the extension into Firefox.

The method does not work with Google Chrome! The method was tested with Firefox 62. There is no warranty for older versions.

  1. Download an addon archive on this link.
  2. Unpack the archive and open a src/index.html file of the archive as a simple html page in Firefox.

It works even faster for Firefox 62 and older because in that case the extension is executed as a separate process. There is no such effect for Firefox 63 and newer because its extensions are executed in the separate process.
But there is no a configuration saving functionality and the addon auto updating. In the mode you can manually edit a src/app/resources/engines.json file of the unpacked archive to change default engine list. Don't forget to press Control + F5 hot keys after the addon files are changed to update the addon page with file cache resetting in the mode!

Description

The mozlz4 is a lz4 file archive format with Mozilla's "magic" file header.
mozlz4 is a legacy variant of lz4 format. If you use liblz4-tool then you have to use -l flag to compress a file as the legacy lz4.

Dependencies

This project uses node-lz4, dustjs, multi.js and CodeMirror libraries. They are inside of the source code and no need to advance installation. Their licenses inside of a LICENSES source code directory.

TODO

  1. Use Emscripten to convert C++ lz4 lib to JS (asm.js)
  2. Replace an estimate of uncompressed file size of lz4 by proper formula

Links

  1. Format description and lz4 lib list is here
  2. lz4 archiver on js is here
  3. node-mozlz4a is a node.js lib to work with mozlz4 is here (I didn't use it)
  4. mozlz4 format description is here
  5. A good article about lz4 is LZ4 Data Compression
  6. Firefox's Use standard lz4 file format instead of the non-standard jsonlz4/mozlz4 bug

About lz4

  1. lz4/lz4#276 (comment)
  2. https://github.com/lz4/lz4/wiki/lz4_Frame_format.md

Mozilla specific lz4

  1. https://hg.mozilla.org/mozilla-central/file/a9a24a28013b/toolkit/mozapps/extensions/AddonManagerStartup.cpp
  2. https://hg.mozilla.org/mozilla-central/rev/a9a24a28013b
  3. https://raw.githubusercontent.com/mozilla/gecko-dev/40e8eb46609dcb8780764774ec550afff1eed3a5/toolkit/mozapps/extensions/AddonManagerStartup.cpp

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published