@hugoalh/adler32
v0.6.0
Published
A module to get the checksum of the data with algorithm Adler32.
Readme
Adler32 (ES)
🔗 DistBoard @hugoalh ● GitHub ● JSR ● NPM
An ECMAScript module to get the checksum of the data with algorithm Adler32.
🎯 Runtime Targets
Any runtime which support ECMAScript should able to use this; These runtimes are officially supported:
🛡️ Runtime Permissions
This does not request any runtime permission.
#️⃣ Sources & Entrypoints
- GitHub Raw
https://raw.githubusercontent.com/hugoalh/adler32-es/{Tag}/mod.ts - JSR
jsr:@hugoalh/adler32[@{Tag}] - NPM
npm:@hugoalh/adler32[@{Tag}]
| Name | Path | Description |
|:--|:--|:--|
| . | ./mod.ts | Default. |
| ./cli | ./cli.ts | CLI. |
[!NOTE]
- Different runtimes have vary support for the sources and entrypoints, visit the runtime documentation for more information.
- It is recommended to include tag for immutability.
- These are not part of the public APIs hence should not be used:
- Benchmark/Test file (e.g.:
example.bench.ts,example.test.ts).- Entrypoint name or path include any underscore prefix (e.g.:
_example.ts,foo/_example.ts).- Identifier/Namespace/Symbol include any underscore prefix (e.g.:
_example,Foo._example).
🧩 APIs
class Adler32 { constructor(data?: Adler32AcceptDataType); get freezed(): boolean; freeze(): this; hash(): Uint8Array; hashHex(): string; update(data: Adler32AcceptDataType): this; updateFromStream(stream: ReadableStream<Adler32AcceptDataType>): Promise<this>; }type Adler32AcceptDataType = | string | BigUint64Array | Uint8Array | Uint16Array | Uint32Array;
[!NOTE]
- For the full or prettier documentation, can visit via:
🧩 CLIs
adler32 $Contextadler32 --file $FilePath <# 🔀 Unordered Positions: `--file`, `$FilePath` #>adler32 --stdin
| Argument | Type | Description |
|:--|:--|:--|
| file | switch | Whether the resource is from file. |
| stdin | switch | Whether the resource is from standard stream input. |
✍️ Examples
new Adler32("Wikipedia").hashHex(); //=> "11E60398"adler32 'Wikipedia'
