All Files in undroid/bz20.1/
Not logged in

Files in directory undroid/bz20.1 in any check-in

  • bz2.tcl
  • pkgIndex.tcl
  • README.md

bz2 0.1

Tcl interface to libbz2 using Ffidl.

Usage

package require bz2

Report library version of libbz2:

bz2 version
# returns library version string

Compress a byte array:

set b [encoding convertto iso8859-1 "I am a byte array"]
# input must be a byte array
set c [bz2 compress $b]
# or [bz2 compress $b 3] to use compression level 3

Decompress a byte array:

# input must be a byte array
set r [bz2 decompress $c]
# or for better performance, if uncompressed length is known
set r [bz2 decompress $c 17]
# result is a byte array (the uncompressed bytes of the input)