Package 'lzstring'

Title: Wrapper for 'lz-string' 'C++' Library
Description: Provide access to the 'lz-string' <http://pieroxy.net/blog/pages/lz-string/index.html> 'C++' library for Lempel-Ziv (LZ) based compression and decompression of strings.
Authors: Sam Parmar [aut, cre], Andrey Krasnov [cph] (Author of included lz-string C++ library), Pawel Rucki [ctb]
Maintainer: Sam Parmar <[email protected]>
License: MIT + file LICENSE
Version: 0.1.3
Built: 2024-10-22 07:24:08 UTC
Source: CRAN

Help Index


Compress a string to Base64

Description

This function takes a string as input and returns a compressed version of the string in Base64 format.

Usage

compressToBase64(string)

Arguments

string

A character string to be compressed.

Value

A character string representing the compressed input string in Base64 format.

Examples

compressToBase64("Hello, world!")

Compress a string to Encoded URI Component

Description

This function takes a string as input and returns a compressed version of the string in Encoded URI Component format.

Usage

compressToEncodedURIComponent(string)

Arguments

string

A character string to be compressed.

Value

A character string representing the compressed input string in Encoded URI Component format.

Examples

compressToEncodedURIComponent("Hello, world!")

Decompress a string from Base64

Description

This function takes a compressed string in Base64 format as input and returns the decompressed version of the string.

Usage

decompressFromBase64(string)

Arguments

string

A character string in Base64 format to be decompressed.

Value

A character string representing the decompressed input string.

Examples

x <- compressToBase64("Hello, world!")
decompressFromBase64(x)

Decompress a string from Encoded URI Component

Description

This function takes a compressed string in Encoded URI Component format as input and returns the decompressed version of the string.

Usage

decompressFromEncodedURIComponent(string)

Arguments

string

A character string in Encoded URI Component format to be decompressed.

Value

A character string representing the decompressed input string.

Examples

x <- compressToEncodedURIComponent("Hello, world!")
decompressFromEncodedURIComponent(x)