Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String compression
Message
 
À
17/08/2005 11:25:05
Héctor Lizarraga
Gobierno Del Edo de Querétaro
Querétaro, Mexique
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01041664
Message ID:
01041692
Vues:
20
Hola Hector,

I don't think you can achieve a lot of compression at a low cost in terms of coding time.

It all depends on the data. If what you want to do is compress short strings within an xml file, you're looking at converting them to 6bits per char (which will allow you to represent 64 different characters), then concatenate the bits into groups of 4 (24 bits total per 4 chars), then encode them with something that will yield valid ascii codes (mime?) and you will get in an IDEAL world, a 30% reduction in size, but in the REAL world, this is unlikely.

I infere from your message, that you are in control of the sending and the receiving ends of the transaction. I suggest you zip the files before sending them and have the receiving component unzip them. It's faster, cheaper, and, most importantly, more efficient.

Alex



>How can I compress a string with pure vfp code?
>
>What I want to achieve is to reduce the size of files that I'm sending inside a XML file.
>
>cFile = FILETOSTR('c:\somefile.dat') && 21k in size
>cFileB64 = STRCONV(cFileB64,'c:\asistencia.b64',0) && 28k in size
>
>I know there are some algorithms for string compression with is good for base64
>I found one in http://www.pbcrypto.com/view.php?algorithm=stringcompr
>
>Any ideas?
>Thanks
Low-carb diet not working? Try the Low-food diet instead!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform