Sizes

See how much bandwidth you can save by compressing files in any of the deflate, gzip and brotli formats

and / or

compression options





start over

Api Reference

post/api/sizes

Request Parameters

Content-Type: multipart/form-data
ParameterSourceDescription
textformdataText for which you want to see the compressed size.
filesformdataFiles for which you want to see the compressed size. Files should have unique names.
Note
text and files are both optional but at least one must be provided. If text is empty, at least 1 file must be provided.

Response

Content-Type: application/json
Status CodeDescription
200

Successfully compressed & measured file sizes.

Example:

{
  "text": {
    "initial": 672,
    "deflate": 308,
    "gzip": 320,
    "brotli": 283
  },
  "files": {
    "test-file.txt": {
      "initial": 3006723,
      "deflate": 1280565,
      "gzip": 1280577,
      "brotli": 1199472
    }
  },
  "total": {
    "initial": 3007395,
    "deflate": 1280873,
    "gzip": 1280897,
    "brotli": 1199755
  }
}
400

Invalid request parameters