ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/JSON-XS/XS.pm
(Generate patch)

Comparing JSON-XS/XS.pm (file contents):
Revision 1.7 by root, Fri Mar 23 15:10:55 2007 UTC vs.
Revision 1.8 by root, Fri Mar 23 15:57:18 2007 UTC

224 224
225Perl usually over-allocates memory a bit when allocating space for 225Perl usually over-allocates memory a bit when allocating space for
226strings. This flag optionally resizes strings generated by either 226strings. This flag optionally resizes strings generated by either
227C<encode> or C<decode> to their minimum size possible. This can save 227C<encode> or C<decode> to their minimum size possible. This can save
228memory when your JSON strings are either very very long or you have many 228memory when your JSON strings are either very very long or you have many
229short strings. 229short strings. It will also try to downgrade any strings to octet-form
230if possible: perl stores strings internally either in an encoding called
231UTF-X or in octet-form. The latter cannot store everything but uses less
232space in general.
230 233
231If C<$enable> is true (or missing), the string returned by C<encode> will be shrunk-to-fit, 234If C<$enable> is true (or missing), the string returned by C<encode> will be shrunk-to-fit,
232while all strings generated by C<decode> will also be shrunk-to-fit. 235while all strings generated by C<decode> will also be shrunk-to-fit.
233 236
234If C<$enable> is false, then the normal perl allocation algorithms are used. 237If C<$enable> is false, then the normal perl allocation algorithms are used.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines