npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mbtiles-compress

v1.2.6

Published

A command line tool to compress MBTiles files using WebP compression

Downloads

14

Readme

mbtiles-compress

A Node.js command line tool for compressing raster MBTiles files using WebP compression.

Installation

npm install -g mbtiles-compress

or run without installing

npx mbtiles-compress

Usage

mbtiles-compress [options] <source.mbtiles> <destination.mbtiles>

Options

Usage: mbtiles-compress [options] <source> <destination>

Compress MBTiles files using WebP compression

Arguments:
  source                        Path to source MBTiles file
  destination                   Path to output compressed MBTiles file

Options:
  -q, --quality <number>        WebP compression quality (0-100) (default: "75")
  -a, --alpha-quality <number>  WebP alpha quality (0-100, default: 100) (default: "100")
  -m, --method <number>         WebP compression method (0-6, default: 4) (default: "4")
  -c, --concurrency <number>    Number of parallel compression operations (default: "20")
  -f, --force                   Overwrite destination if it exists (default: false)
  -s, --skip-count              Skip counting rows before compression (default: false)
  -h, --help                    display help for command

Examples

# Basic compression with default quality
npx mbtiles-compress input.mbtiles output.mbtiles

# Compression with custom quality
npx mbtiles-compress input.mbtiles output.mbtiles --quality 60

# High concurrency for faster processing
npx mbtiles-compress input.mbtiles output.mbtiles -c 100

# Maximum compression method
npx mbtiles-compress input.mbtiles output.mbtiles -m 6

WebP Parameters

  • Quality (0-100): Controls the overall image quality. Higher values = better quality but larger files
  • Alpha Quality (0-100): Controls the quality of alpha channel (transparency). 0 = lossy alpha, 100 = lossless alpha
  • Method (0-6): Compression method/speed tradeoff. 0 = fastest compression, 6 = best compression (slowest)

Performance

Under the hood, this tool uses the sharp library. In addition to concurrency, also UV_THREADPOOL_SIZE environment variable can be set to get the best performance. See sharp's documentation for more details.

export UV_THREADPOOL_SIZE=64
npx mbtiles-compress input.mbtiles output.mbtiles -c 100