@types/lz-string
- Version 1.3.34
- Published
- 6.05 kB
- No dependencies
- MIT license
Install
npm i @types/lz-string
yarn add @types/lz-string
pnpm add @types/lz-string
Overview
TypeScript definitions for lz-string
Index
Variables
variable LZString
var LZString: LZString.LZStringStatic;
Interfaces
interface LZStringStatic
interface LZStringStatic {}
LZ-based compression algorithm for JavaScript.
method compress
compress: (uncompressed: string) => string;
Compresses input string producing an instance of an "invalid" UTF-16 string. Such string could be stored in localStorage only on webkit browsers (tested on Android, Chrome, Safari).
Parameter uncompressed
A string which should be compressed.
method compressToBase64
compressToBase64: (uncompressed: string) => string;
Compresses input string producing an instance of a ASCII UTF-16 string, which represents the original string encoded in Base64. The result can be safely transported outside the browser with a guarantee that none of the characters produced need to be URL-encoded.
Parameter uncompressed
A string which should be compressed.
method compressToEncodedURIComponent
compressToEncodedURIComponent: (uncompressed: string) => string;
produces ASCII strings representing the original string encoded in Base64 with a few tweaks to make these URI safe. Hence, you can send them to the server without thinking about URL encoding them. This saves bandwidth and CPU
Parameter uncompressed
A string which should be compressed.
method compressToUint8Array
compressToUint8Array: (uncompressed: string) => Uint8Array;
produces an uint8Array
Parameter uncompressed
A string which should be compressed.
method compressToUTF16
compressToUTF16: (uncompressed: string) => string;
Compresses input string producing an instance of a "valid" UTF-16 string, in the sense that all browsers can store them safely.
Parameter uncompressed
A string which should be compressed.
method decompress
decompress: (compressed: string) => null | string;
Decompresses "invalid" input string created by the method compress().
Parameter compressed
A string obtained from a call to compress().
method decompressFromBase64
decompressFromBase64: (compressed: string) => null | string;
Decompresses ASCII UTF-16 input string created by the method compressToBase64().
Parameter compressed
A string obtained from a call to compressToBase64().
method decompressFromEncodedURIComponent
decompressFromEncodedURIComponent: (compressed: string) => null | string;
Decompresses "valid" input string created by the method compressToEncodedURIComponent().
Parameter compressed
A string obtained from a call to compressToEncodedURIComponent().
method decompressFromUint8Array
decompressFromUint8Array: (compressed: Uint8Array) => null | string;
Decompresses "valid" array created by the method compressToUint8Array().
Parameter compressed
A string obtained from a call to compressToUint8Array().
method decompressFromUTF16
decompressFromUTF16: (compressed: string) => null | string;
Decompresses "valid" input string created by the method compressToUTF16().
Parameter compressed
A string obtained from a call to compressToUTF16().
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/lz-string
.
- Markdown[](https://www.jsdocs.io/package/@types/lz-string)
- HTML<a href="https://www.jsdocs.io/package/@types/lz-string"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2262 ms. - Missing or incorrect documentation? Open an issue for this package.