What's new? | Help | Directory | Sign in
Google
jslibs
standalone Javascript development environment with general purpose native libraries.
  
  
  
  
    
Search
for
Updated Feb 27, 2008 by soubok
Labels: doc
jsz  
jsz module

jsz module

home > JSLibs > jsz - -

Description

This module manage zlib data compression and decompression. more.

Example

var deflate = new Z( Z.DEFLATE, 9 );
var clearData;
var compressedData;

for ( var i = 10; i >= 0; --i ) {

	var chunk = randomString(10000);
	compressedData += deflate( chunk );
	clearData += chunk;
}
compressedData += deflate(); // flush


var inflate = new Z( Z.INFLATE );
var clearData2 = inflate( compressedData, true );

Print( 'ratio:' + compressedData.length + ': ' + Math.round( 100 * compressedData.length / clearData.length ) + '%','\n');
if ( clearData2 != clearData )

	Print('error!!!','\n');
}

code snippet


jsz::Z class

home > JSLibs > jsz > Z -

Description

Functions

Properties

Static Properties

Constants


jsz::ZError class

home > JSLibs > jsz -

Description

You cannot construct this class. Its aim is to throw as an exception on any zlib runtime error.

Properties

Exemple

...

Sign in to add a comment