Uncompressing socket data from Java

Ask a Question related to Macromedia Flash Data Integration, Design and Development.

  1. #1

    Default Uncompressing socket data from Java

    Has anyone had any luck sending compressed data from java to flash using the
    flash.net.Socket class? I am compressing the data on the java side using the
    Deflator class which uses zlib compression. Trying to uncompress using
    ByteArray.uncompress() and it is failing and throwing an exception saying
    unable to uncompress. I would like to find a compression algorithm in java that
    matches the one used by ByteArray.uncompress.

    masteffens Guest

  2. Similar Questions and Discussions

    1. ODBC Data socket problem
      I am using Cold Fusion MX 7 on Windows 2003 and attempting to connect to an ODBC data source. The data source (a thoroughbred business basic...
    2. Streaming Data - how? XML socket? Remoting?
      I need a good example and someone to fill me on the best way to do streaming data. Basically when information changes on the data source (seconds,...
    3. Java socket server
      I am pretty sure you use readLine() method in Java. Read line reads the content only when the last char i '\n' (end line). So if you try to send...
    4. Java socket server
      Im trying to make my own socket server in java and flash, but for some reason the server class doesnt recieve anything until the connection is...
    5. Uncompressing files coming out of cpio -o on the fly??
      I'm trying to move lots of compressed Oracle datafiles from one system to another. The fastest scheme I've come up with so far is to use a...
  3. #2

    Default Re: Uncompressing socket data from Java

    I'm have the same problem exactly. Replace Java Deflater with Python zlib module.
    the_real_hinkle Guest

  4. #3

    Default Re: Uncompressing socket data from Java

    I now have it working - the problem was due to the fact that the data is
    buffered and sent through in chunks. I had to send through the number of bytes
    first, followed by the compressed data. The flash code then appends to a byte
    array until it has read all of the bytes and only decompresses when all bytes
    have been read. Buffering of data sent over a socket is controlled by the op
    sys I think and you can't easily change the buffer size. The other way you
    could do it is to append an end token to the compressed data before sending.
    The flash code would then keep adding to the ByteArray until it finds the end
    token.

    masteffens Guest

  5. #4

    Default Re: Uncompressing socket data from Java

    Hi can u share some java and as3 code showing how u solved it?
    paf Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139