Lasso Soft Inc. > Home


AuthorBil Corry
LicensePublic Domain
Posted02 Dec 2005
Updated07 Sep 2006
More by this author...


Packs variables into compact, ASCII-safe bundles.  Optionally can encrypt data.

Note: requires [lp_var_unpack] to unpack the variable.

Sample Usage

var:'test' = (array: 1, 2, 3, 4, 5);
'; ($test->serialize)->size; '
'; var:'pack' = (lp_var_pack: $test, 'secret'); $pack->size; '
'; var:'unpack' = (lp_var_unpack: $pack, 'secret'); $unpack; '
'; '

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.


	-description='Packs variables into compact, ASCII-safe bundles.  Optionally can encrypt data.',

	if: (local_defined:'password');
		local:'pack' = (encrypt_blowfish2:-seed=#password,(compress:(#object_to_pack->serialize)));
		local:'pack' = (compress:(#object_to_pack->serialize));

	if: (local_defined:'noencode');
		return: #pack;
	else: (local_defined:'encodehex');
		return: (encode_hex: #pack);
	else; // base64
		return: (encode_base64: #pack);



Related Tags


No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft