ArDrive

Compress text and code

Compress text and code stores your text and code files in less space on Arweave. It suits websites and code, which are made of files that shrink well, such as HTML, CSS, and JavaScript. ArDrive uses gzip, a common compression format that browsers unpack by themselves.

Compress files when you upload

  1. Open a public drive.

  2. Click New, then click Upload files, or Upload folder for a website.

  3. Choose your files.

  4. In the upload review, open Options.

  5. Select Compress text and code. The note under it says "Smaller storage for websites and code."

  6. Click Upload.

    The upload review with Options open, and Upload with thumbnails and Compress text and code selected

When the box appears

Compress text and code appears only when both of these are true:

  • The drive is public. A private drive never compresses its files.
  • The upload has at least one file that ArDrive can compress.

It is off every time you open the review. ArDrive doesn't remember your choice, so you decide for each upload.

Which files are compressed

With the box selected, ArDrive compresses each file that shrinks well, in a folder or loose, at any depth:

  • Text and code, such as HTML, CSS, JavaScript, JSON, plain text, and SVG images.

ArDrive leaves these as they are:

  • Files that are already compressed: images other than SVG, audio, video, PDFs, and archives such as zip.
  • A file that doesn't get smaller.
  • A file over 8 MiB.
  • Deployment manifests.

A compressed file keeps its name and its type, and ArDrive still shows its original size.

Cost

The upload review prices the files at their original size. You pay for what is stored, which is smaller, so the price you pay can be lower than the review shows.

Download and open compressed files

ArDrive and web browsers unpack compressed files for you. Downloading a compressed file from ArDrive gives you the original file. A website you publish loads as normal. Some other tools read the stored data as it is, so they show the compressed bytes.