steeve / python-lz4

LZ4 bindings for python
http://github.com/steeve/python-lz4
106 stars 31 forks source link

Ask Help for Decompress Message which Compressed by Java Lz4 Lib #46

Open mobilbear opened 8 years ago

mobilbear commented 8 years ago

Hi,

I'm working on a python based project, and this project need to receive messages compressed by lz4 lib in Java, and the messages are published by Tibco queue.

As an example, we have received below java message from the tibco Queue, as told by the publisher, we need to read the data in the "Object", and then decompress it use python lz4 lib.

But the problem is we do not know how to read the object and decompress it, seems this lz4.decompress does not work? As the original java lz4 lib takes 4 parameters...

Can anyone take a look and see if below message can be decompressed? if so, how to decompress?

Sample message as following:

ObjectMessage={

Header={ JMSMessageID={ID:RAMEVT_EMS_01Q.16B5569BA0383BE:2573726} JMSDestination={Queue[test.message.lz4]} JMSReplyTo={null} JMSDeliveryMode={PERSISTENT} JMSRedelivered={true} JMSCorrelationID={null} JMSType={null} JMSTimestamp={Sat Jan 23 03:30:33 EST 2016} JMSExpiration={0} JMSPriority={4} }

Properties={ JMSXDeliveryCount={Integer:2} LZ4_FAST_COMPRESSED_MAX_LEN={Integer:815} ET_MSG_HKEY={Integer:1232415162} } Object={[B@1999b96} } }

jennolsen84 commented 8 years ago

please try a different library first, like the C library. I am sure once you get it working in C, you will be able to figure out the python library. (I am trying to say that the problem is not with the code)

The python library does indeed work, but judging on the question you asked, it seems like you need general programming help. Perhaps you can talk to a coworker, or hire a consultant.