# ips.js

> IPS patching utility

Latest version **0.2.1** (published 2018-08-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install ips.js
pnpm add ips.js
yarn add ips.js
bun add ips.js
```

Provides the command `ips`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2018-08-05 |
| First published | 2018-07-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 24.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Keith McKnight |
| Maintainers | kmck |
| Keywords | ips, patch, rom |

## Links

- npm: https://www.npmjs.com/package/ips.js
- npm.io page: https://npm.io/package/ips.js

## Dependencies (5)

- [chalk](https://npm.io/package/chalk.md) ^2.4.1
- [winston](https://npm.io/package/winston.md) ^3.0.0
- [crc-hash](https://npm.io/package/crc-hash.md) ^0.2.2
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [commander](https://npm.io/package/commander.md) ^2.16.0

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2018-08-05
- 0.2.0 — 2018-08-05
- 0.1.0 — 2018-07-10

## README

# ips.js

Create and apply [IPS] patches, like the kind you'd use for a ROM hack.

## Installation

```bash
yarn global add ips.js
```

## Usage

### Command line

```bash
# Creating a patch
ips create clean.rom changed.rom patch.ips

# Applying a patch
ips apply clean.rom patch.ips changed.rom
```

### JavaScript

Note: All files are expected to be `Buffer` instances.

```js
import { createIpsPatch, applyIpsPatch } from 'ips.js';

// Creating a patch
const patchFile = createIpsPatch(sourceFile, targetFile);

// Applying a patch
const targetFile = applyIpsPatch(sourceFile, patchFile);
```

## Notes

When creating an IPS patch, this tool does a byte-by-byte comparison between the source and target files.
Only the bytes that have changed are included in the patch, which can result in slightly larger patches than other tools.

Those tools seem to save bytes in the patch by combining differences that are close together. Such patches
"fill in the gaps" between changes with extra unchanged data from the original file for a smaller filesize.
This isn't necessarily a good or a bad thing, just a different approach.

The side-effect would be that these smaller-size/larger-changeset patches might do surprising things when
multiple patches are applied to the same file. Does this matter? Probably not! Anyway, thanks for reading this.

## License

ISC © [Keith McKnight](https://keith.mcknig.ht)

[IPS]: http://fileformats.archiveteam.org/wiki/IPS_(binary_patch_format)

---
_Source: https://npm.io/package/ips.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
