npm.io
7.0.4 • Published 8 months ago

@types/sse4_crc32

Licence
MIT
Version
7.0.4
Deps
1
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/sse4_crc32

Summary

This package contains type definitions for sse4_crc32 (https://github.com/anandsuresh/sse4_crc32#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sse4_crc32.

index.d.ts

/// <reference types="node" />

import { ReadStream } from "fs";
import { Writable } from "stream";

export class Crc32CStream extends Writable {
    constructor(crc?: number);
}

/**
 * @param stream Readable stream object
 * @param [crc] Non-zero integer value
 */
export function fromStream(stream: ReadStream, crc?: number): Crc32CStream;
/**
 * @param buf Buffer object or string
 * @param [initial] Non-zero integer value
 */
export function calculate(buf: Buffer | string, initial?: number): number;

// only available when NODE_ENV='production'
export const hardware_support: boolean | undefined;
/**
 * Calculates CRC-32C for the specified string/buffer using SSE 4.2 extensions
 * @param buf Buffer object or string
 * @param [initial] Non-zero integer value
 */
export const sse42_crc: ((buf: Buffer | string, initial?: number) => number) | undefined;
/**
 * Calculates CRC-32C for the specified string/buffer using table-lookups
 * @param buf Buffer object or string
 * @param [initial] Non-zero integer value
 */
export const table_crc: ((buf: Buffer | string, initial?: number) => number) | undefined;

Additional Details

  • Last updated: Fri, 09 Jan 2026 2009 GMT
  • Dependencies: @types/node

Credits

These definitions were written by .