image-in-browser
Version:
Package for encoding / decoding images, transforming images, applying filters, drawing primitives on images on the client side (no need for server Node.js)
39 lines (38 loc) • 938 B
TypeScript
/** @format */
/**
* Class representing a VP8L color cache.
*/
export declare class VP8LColorCache {
/**
* Array of color entries.
* @private
*/
private readonly _colors;
/**
* Hash shift value calculated as 32 - hashBits.
* @private
*/
private readonly _hashShift;
/**
* Create a VP8LColorCache.
* @param {number} hashBits - Number of bits for the hash.
*/
constructor(hashBits: number);
/**
* Insert a color into the cache.
* @param {number} argb - The color value in ARGB format.
*/
insert(argb: number): void;
/**
* Lookup a color in the cache.
* @param {number} key - The key to lookup.
* @returns {number} - The color value in ARGB format.
*/
lookup(key: number): number;
/**
* Multiplier used in the hash function.
* @private
* @static
*/
private static readonly hashMultiplier;
}