UNPKG

@types/sse4_crc32

Version:
54 lines (44 loc) 1.77 kB
# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sse4_crc32/index.d.ts) ````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: Tue, 07 Nov 2023 15:11:36 GMT * Dependencies: [@types/node](https://npmjs.com/package/@types/node) # Credits These definitions were written by [naeemy](https://github.com/naeemy).