@types/sse4_crc32
TypeScript icon, indicating that this package has built-in type declarations

7.0.3 • Public • Published

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: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/node

Credits

These definitions were written by naeemy.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/sse4_crc32

Weekly Downloads

238

Version

7.0.3

License

MIT

Unpacked Size

4.85 kB

Total Files

5

Last publish

Collaborators

  • types