Compress byte array with C# and decompress that byte Array in java - java

I have a server program written in c# that continuously take screen shots and send it to my android device... i want those screen shot images to compress on server side written in c# and then decompress my client side written in java... any idea please!!!!!!

Related

How to convert byte[] Array format Images into H.264 video compression format to push to AWS Kinesis Video stream

I'm developing application and will be getting continuous byte[] format images and need to convert to H.264 video compression video and need to push to AWS Kinesis Video stream.
Could you please let me know how we can do it in Java or is there any available SDK/Plugin which ca n used to push the data.

Convert Image from Little to Big Endian

I am trying to transfer an image saved to a raspberry pi from the rpi to an android application to display it. I am treating the raspberry pi as the server and the android app as the client. My server side is implemented using python. I am using pylab to save a figure to the raspberry pi and then later open the image and read the contents as a byte array. This byte array is then passed to the android app, written in java.
I can view the image on the rpi when I open it, but once it is sent to the android, something is happening to it that causes the incorrect number of bytes to be read and the image to be corrupted. I realized that java reads big endian while the raspberry pi byte order is little endian. I am not sure if this is what is causing the problem in transferring the image?
So, I am wondering if there is a way to either encode the byte array as big endian when it is sent from python or a way to decode the byte array as little endian when it is received by java. I tried simply reversing the image byte array in python but that did not work. Any suggestions would be very helpful!
I am not an expert in hardware differences between a Pi and other platforms, but this process can be performed using ByteBuffer.
You can get an instance of ByteBuffer using ByteBuffer.wrap(byteArray) or ByteBuffer.allocate(capacity).
You can then set the endian-ness of the buffer using buffer.order(ByteOrder.BIG_ENDIAN); or buffer.order(ByteOrder.LITTLE_ENDIAN);
The data can then be returned with buffer.get().

How to get raw data from pcap file and decode it in java

I'm studying about Networking .I had sent a file image between two pc by ICMP then capture by wireshark. I'm try to get raw data from pcap file and decode it to get data that I just had sent by java. I had taken a lot of times but I dont know how i can do it. I really wanna you do me a favor. Sorry because of English not my mother tongue.

how to compress json in php and decode in android

I am developing an app which sends may be like 400kb of data in the interval of every 5seconds ,i have read somewhere that we can conpress the data in php using gz but how to measure the compression and how to deconpress it in java /android .

Microphone UDP live audio streaming

I'm trying write a java program to send live microphone data over UDP, then receive the data in VLC. I'm basically using the same code as in this post to package up the stream and send them over. When I receive the data in VLC, I get nothing. I see a bunch of input coming in but none of it is interpreted as audio data. It tries to resolve the information as mpga or mpgv, but I'm pretty sure it's being sent as raw audio. Is the problem on VLC's end? Should I configure VLC to receive a specific format? Or is the problem with my program not packaging the data in a way VLC can interpret it?
First thing you should do is capture the live microphone data to a file and figure out exactly what format it is. Then transfer the file to VLC (if that makes sense) to see if VLC can cope with it in that form.
If you are going to use UDP in the long term, you need to be sure that the audio format you are using can cope with the loss of chunks of data in the middle of the audio stream due to network packet loss. If not, you should use TCP rather than UDP.

Categories

Resources