# @balena/node-crc-utils

> CRC Utils. Combines two or more CRC32 checksums into new one.

Latest version **3.1.0** (published 2026-06-03) · 0 weekly downloads

## Install

```sh
npm install @balena/node-crc-utils
pnpm add @balena/node-crc-utils
yarn add @balena/node-crc-utils
bun add @balena/node-crc-utils
```

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2026-06-03 |
| First published | 2020-11-13 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16 |
| Dependencies | 0 |
| Unpacked size | 20.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3 |
| Author | Balena Ltd. |
| Maintainers | balena.io, page |
| Keywords | crc32, crc32_combine, crc, gzip |

## Links

- npm: https://www.npmjs.com/package/@balena/node-crc-utils
- Repository: https://github.com/balena-io-modules/node-crc-utils
- Homepage: https://github.com/balena-io-modules/node-crc-utils#readme
- Issues: https://github.com/balena-io-modules/node-crc-utils/issues
- npm.io page: https://npm.io/package/@balena/node-crc-utils

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 3.1.0 (latest) — 2026-06-03
- 3.1.0-build-more-than-4gb-file-support-50e00c06cd2631ed0d056120c2901672449139af-1 (build-more-than-4gb-file-support) — 2026-06-03
- 3.0.1 — 2023-12-19
- 3.0.1-build-klutchell-patch-1-6bb1120b73216a04891f8788b18f45a3ae02d5c3-1 — 2023-12-19
- 3.0.0 — 2023-01-20
- 3.0.0-build-support-node-18-cd86a3a882d377c6daaf9d9fc18da4458e6dea65-1 — 2023-01-20
- 2.0.1 — 2021-04-06
- 2.0.1-fix-crc-length-type-07794868b0096cbe315a42e71d8bd3f987bea361 — 2021-04-06
- 2.0.0 — 2020-11-13
- 2.0.0-emscripten-5be7d27441be37a4de042a3a3c55b8bcd8acfaa2 — 2020-11-13
- 2.0.0-emscripten-121ef9e3337a92cb18c41d1e18ea3359a88c6dd2 — 2020-11-13
- 2.0.0-emscripten-2aa438d757e3f9958076b49b2e8a5109283de374 — 2020-11-13
- 2.0.0-emscripten-a491fdf35b0a56cf193679bde558f68821b5a237 — 2020-11-13

## README

Node CRC32 Utils
==============

Combines two or more CRC32 checksums into new one.

##How to install:

```
npm install @balena/node-crc-utils
```

##How to build:

Install emscripten, clone this repo then
```
npm run build
```

##Example:

```javascript
const crcUtils = require('@balena/node-crc-utils');

// for crc32 checksum use lib: https://github.com/brianloveswords/buffer-crc32/
const crc32 = require('buffer-crc32');

const foo = Buffer.from('foo');
const bar = Buffer.from('bar');

const fooCrc32 = crc32(foo); // <Buffer 8c 73 65 21>
const barCrc32 = crc32(bar); // <Buffer 76 ff 8c aa>
 
const foobar = Buffer.from('foobar');
const foobarCrc32 = crc32(foobar);

crcUtils.ready.then(() => {
	const foobarCrc32Combined = crcUtils.crc32_combine(
		fooCrc32.readUInt32BE(0), 
		barCrc32.readUInt32BE(0), 
		bar.length
	); 

	// CRC32 are the same but Endianness is prepared for GZIP format
	console.log(foobarCrc32);         // <Buffer 9e f6 1f 95>
	console.log(foobarCrc32Combined); // <Buffer 95 1f f6 9e>
});
```

---
_Source: https://npm.io/package/@balena/node-crc-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
