🚀 NeoZipKit v0.6.0 · NeoZip-blockchain v0.6.0 · NeoZip CLI v0.90.0

NeoZip Developer Documentation

Use NeoZipKit for ZIP creation, compression, and AES-256 encryption. Use NeoZip-blockchain for timestamping, NFT minting, and token verification. Full TypeScript support, browser and Node.js compatibility.

NeoZipKit - Installation

npm

npm install neozipkit

yarn

yarn add neozipkit

NeoZipKit - Quick Start

Browser Application

import { ZipkitBrowser } from 'neozipkit/browser-esm';

const zip = new ZipkitBrowser();
await zip.addFile(file, { level: 6 });
const zipBlob = await zip.createZipBlob();

Node.js Application

import { ZipkitNode } from 'neozipkit/node';

const zip = new ZipkitNode();

// Create a ZIP from files
await zip.createZipFromFiles(['file1.txt', 'file2.txt'], 'output.zip');

// Extract a ZIP file
await zip.extractZipFile('archive.zip', './output');

ZIP Verification

import { ZipkitBrowser } from 'neozipkit/browser-esm';

const zip = new ZipkitBrowser();
await zip.loadZipBlob(zipBlob);

// Verify file integrity
const entries = zip.getDirectory();
for (const entry of entries) {
  const isValid = await zip.verifyEntry(entry);
  console.log(`${entry.filename}: ${isValid ? 'Valid' : 'Invalid'}`);
}

NeoZipKit - AES-256 Encryption

NeoZipKit v0.6.0 adds full AES-256 encryption (WinZip-compatible AE-1/AE-2). Create and extract encrypted archives in Node.js and browser. Use password and encryptionMethod: 'aes256' in compress options.

Create AES-256 Encrypted ZIP

import { ZipkitNode } from 'neozipkit/node';

const zip = new ZipkitNode();
await zip.createZipFromFiles(
  ['file1.txt', 'file2.txt'],
  'secure.zip',
  {
    password: 'your-secure-password',
    encryptionMethod: 'aes256'
  }
);

Extract AES-256 Encrypted ZIP

import { ZipkitNode } from 'neozipkit/node';

const zip = new ZipkitNode();
await zip.extractZipFile('secure.zip', './output', {
  password: 'your-secure-password'
});
// Auto-detects AES-256 or legacy ZIP encryption

See neozipkit on npm for examples: create-aes-zip.ts, extract-aes-zip.ts.

NeoZipKit - Compression Methods

NeoZipKit supports multiple compression algorithms to suit different use cases:

  • Deflate: Standard ZIP compression, widely compatible
  • ZStandard: Superior compression ratios with fast processing
  • Stored: No compression, useful for already compressed files
import { CompressOptions, CMP_METHOD } from 'neozipkit';

// Deflate compression
const deflateOptions: CompressOptions = {
  useZstd: false,
  level: 6
};

// ZStandard compression
const zstdOptions: CompressOptions = {
  useZstd: true,
  level: 3
};

// Stored (no compression)
const storedOptions: CompressOptions = {
  cmpMethod: CMP_METHOD.STORED
};

NeoZip-blockchain - Installation

NeoZip-blockchain is the companion library for all blockchain features. Use with NeoZipKit for full NZIP workflows.

npm

npm install neozip-blockchain

yarn

yarn add neozip-blockchain

For full NZIP workflows: npm install neozipkit neozip-blockchain

NFT Minting

import { ZipkitMinter } from 'neozip-blockchain';

const minter = new ZipkitMinter('merkleRoot123...', {
  walletPrivateKey: '0x...',
  network: 'base-sepolia'
});

const result = await minter.mintToken();
console.log(`Token ID: ${result.tokenId}`);

Token Verification

import { ZipkitVerifier } from 'neozip-blockchain';

const verifier = new ZipkitVerifier({ debug: false });

// Verify token metadata
const result = await verifier.verifyToken(tokenMetadata);
if (result.success) {
  console.log('Token verified!');
}

OpenTimestamps (Optional Add-on)

import { createTimestamp, verifyOtsZip } from 'neozip-blockchain/ots';

// Create timestamp for a file's hash
const otsProof = await createTimestamp(merkleRoot);

// Verify a loaded ZIP file
const result = await verifyOtsZip(zipInstance);
if (result.status === 'valid') {
  console.log('Verified! Block:', result.blockHeight);
}

Full Workflow: NeoZipKit + NeoZip-blockchain

import { ZipkitNode } from 'neozipkit/node';
import { ZipkitMinter, ZipkitVerifier } from 'neozip-blockchain';

// Create and tokenize a ZIP
const zip = new ZipkitNode();
await zip.createZipFromFiles(files, 'archive.zip', { useSHA256: true });

// Get merkle root from ZIP
const merkleRoot = zip.getMerkleRoot();

// Mint as NFT
const minter = new ZipkitMinter(merkleRoot, {
  walletPrivateKey: process.env.WALLET_KEY,
  network: 'base-sepolia'
});
const result = await minter.mintToken();

NeoZip CLI v0.90.0 - AES-256 Encryption

NeoZip CLI v0.90.0 adds full AES-256 encryption as the default. Use -e or --encrypt to create encrypted archives. Extraction auto-detects AES-256 or PKZIP.

Create AES-256 Encrypted Archive

# Create AES-256 encrypted archive (default, will prompt for password)
neozip -e secure.nzip file.txt

# With password
neozip -e -P "mypassword" secure.nzip file.txt

# Explicitly use AES-256
neozip --aes256 -P "mypassword" secure.nzip file.txt

Extract Encrypted Archive

# Extract (auto-detects AES-256 or PKZIP)
neounzip -P "mypassword" secure.nzip tests/extracted/

Use --pkzip for legacy PKZIP encryption (compatibility only). See neozip-cli on npm for full documentation.

TypeScript Support

Both NeoZipKit and NeoZip-blockchain are written in TypeScript with comprehensive type definitions. All APIs are fully typed with IntelliSense support for better developer experience.

import type { ZipEntry, CompressOptions } from 'neozipkit';

// NeoZipKit types
const entry: ZipEntry = zip.getZipEntry('file.txt');
const options: CompressOptions = { useZstd: true, level: 3 };

Additional Resources

NeoZipKit

  • Version: 0.6.0
  • AES-256: WinZip-compatible
  • License: MIT
  • npm
  • GitHub

NeoZip-blockchain

NeoZip CLI

  • Version: 0.90.0
  • AES-256: Default encryption
  • npm
  • GitHub

Ready to Get Started?

Install NeoZipKit and NeoZip-blockchain to build blockchain-secured ZIP file applications.