public class Compressor extends JSONzip
bcd, end, endOfNumber, int14, int4, int7, maxSubstringLength, minSubstringLength, namehuff, namekeep, probe, stringkeep, substringhuff, substringkeep, substringLimit, twos, values, zipArrayString, zipArrayValue, zipEmptyArray, zipEmptyObject, zipFalse, zipNull, zipObject, zipTrue| Constructor and Description |
|---|
Compressor(BitWriter bitwriter)
Create a new compressor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Finish the final byte and flush the bitwriter.
|
void |
pad(int factor)
Pad the output to fill an allotment of bits.
|
void |
zip(JSONArray jsonarray)
Compress a JSONArray.
|
void |
zip(JSONObject jsonobject)
Compress a JSONObject.
|
begin, postMortempublic Compressor(BitWriter bitwriter)
bitwriter - The BitWriter this Compressor will output to. Don't forget to
flush.public void flush()
throws JSONException
JSONExceptionpublic void pad(int factor)
throws JSONException
factor - The size of the bit allotment. A value of 8 will complete and
flush the current byte. If you don't pad, then some of the
last bits might not be sent to the Output Stream.JSONExceptionpublic void zip(JSONObject jsonobject) throws JSONException
jsonobject - JSONExceptionpublic void zip(JSONArray jsonarray) throws JSONException
jsonarray - JSONExceptionCopyright © 2014. All Rights Reserved.