I just wanted to know if the size of the record could be smaller, if so 
then how?


Regards,
Nhat

On Friday, April 4, 2014 7:27:33 AM UTC+2, Andrey Lomakin wrote:
>
> Hi,
> All content is compressed now.
> Why do you ask ?
>
>
> On Thu, Apr 3, 2014 at 8:25 PM, Nhat Nguyen 
> <[email protected]<javascript:>
> > wrote:
>
>> Hi,
>>
>> does anybody knows how to compress a document or just a single field 
>> (just the value, not the key) with the java api.
>>
>> I mean to reduce the record size.
>>
>> I tried it in several ways:
>>
>> OCompression oCompression = OCompressionFactory.INSTANCE.getCompression( 
>> "nothing" );
>> or
>> OCompression oCompression = OCompressionFactory.INSTANCE.getCompression( 
>> "snappy" );
>> or
>> OCompression oCompression = OCompressionFactory.INSTANCE.getCompression( 
>> "gzip" );
>> ...
>> ...
>> document.field("fieldName",oCompression.compress(("fieldValue").getBytes
>> ()));
>>
>>
>> the result was this:
>>
>>
>> Compression:
>> without calling oCompression.compress: 120kByte  //just 
>> document.field("fieldName","fieldValue"));
>> nothing: 140kByte
>> snappy:  150kByte
>> gzip:    250kByte
>>
>> regards,
>> Nhat
>>  
>> -- 
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Best regards,
> Andrey Lomakin.
>
> Orient Technologies
> the Company behind OrientDB
>
>  

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to