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

epub-compare

v1.0.0

Published

CLI tool to compare two EPUB files compression methods and structure

Downloads

6

Readme

epub-compare

A CLI tool to compare two EPUB files compression methods and structure.

Features

  • Compression Method Comparison: Compare compression methods (STORED vs DEFLATED) for each file entry
  • Structure Analysis: Analyze file structure and entry order differences
  • EPUB Compliance Check: Verify that mimetype file is first and uncompressed (EPUB specification requirement)
  • Detailed Reporting: Color-coded output showing differences between files
  • Entry-by-Entry Comparison: Compare all entries in both files with clear status indicators

Installation

Global Installation

npm install -g epub-compare

Local Installation

npm install epub-compare

From Source

git clone https://github.com/kyungw00k/epub-compare.git
cd epub-compare
npm install

Usage

Global Installation

epub-compare <file1.epub> <file2.epub>

Local Installation

npx epub-compare <file1.epub> <file2.epub>

From Source

node index.js <file1.epub> <file2.epub>

Output Example

File 1: book1.epub
File 2: book2.epub

Entry Comparison:
────────────────────────────────────────────────────────────────────────────────────────────────────
Order Name                                   File1 Compression File2 Compression Status
────────────────────────────────────────────────────────────────────────────────────────────────────
0     mimetype                               STORED           STORED           Match
1     META-INF/container.xml                 DEFLATED         DEFLATED         Match
2     OEBPS/content.opf                      DEFLATED         DEFLATED         Match
3     OEBPS/toc.ncx                          DEFLATED         DEFLATED         Match
4     OEBPS/chapter1.xhtml                   DEFLATED         STORED           Different compression
5     OEBPS/chapter2.xhtml                   DEFLATED         DEFLATED         Match
6     OEBPS/extra-file.xhtml                 MISSING          DEFLATED         Only in file2

Summary:
──────────────────────────────────────────────────
Total entries in file1: 6
Total entries in file2: 7
File1: mimetype is first and uncompressed
File2: mimetype is first and uncompressed

Status Indicators

  • 🟢 Match: Files are identical in compression method and order
  • 🟡 Different compression: Same file but different compression method
  • 🟡 Different order: Same file but different position in archive
  • 🔴 Only in file1: File exists only in the first EPUB
  • 🔴 Only in file2: File exists only in the second EPUB

Requirements

  • Node.js >= 14.0.0

Dependencies

Use Cases

  • EPUB Optimization: Compare different compression settings
  • Quality Assurance: Verify EPUB file structure compliance
  • Debugging: Identify differences between EPUB versions
  • Analysis: Understand compression patterns in EPUB files

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Issues

If you find any issues or have suggestions, please report them on GitHub Issues.

Author

Kyungwook Park - @kyungw00k