Perl Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Perl Examples

Quick Start
Perl Unicode
Perl Byte Array
Perl Certs
Perl Email
Perl Encryption
Perl FTP
HTML-to-XML
Perl HTTP
Perl IMAP
Perl MHT
Perl MIME
Perl RSA
Perl S/MIME
Perl Signatures
Perl Socket
Perl Spider
Perl Tar
Perl Upload
Perl XML
Perl XMP
Perl Zip

More Examples...
String
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

 

ensureBuffer for fast byte array append

Demonstrates how to call ensureBuffer to ensure efficiency (high-performance) when appending large amounts of data to a CkByteData.

Download Chilkat Perl Module

use chilkat;


$data = new chilkat::CkByteData();

#  Pre-allocate 20MB (if necessary) for the appends to follow.
#  This will prevent re-occuring (internal) buffer reallocation,
#  and dramatically improves performance.
$data->ensureBuffer(20000000);

for ($i = 0; $i <= 1000000; $i++) {
    $data->appendStr("1234567890ABCDEF");
}

$sz = $data->getSize();
print $sz . "\r\n";


 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2007 Chilkat Software, Inc. All Rights Reserved.