GZip uncompression problem

Hi,
I use java.util.zip package to compress and uncompress the gzip files. Code works fine but I have a problem as follows;
I get a tar file with tftp from the ASAM and in this tar file there exists a gzip file. My program is not able to uncompress this file. However, I am able to decompress this file with GNU zip (gunzip filename) and compress it again (gzip filename). The last file that I compressed can be handled by my program.
The interesting thing is the size of the file decreases when I compress it with GNU zip. I have no idea about the compression used at the ASAM side but it is declared as GNU zip.
Is there anyone have any idea about the problem?
Thanks

Have you tried GZIPInputStream? If so, I think Apache or maybe Gnu have a zip file class set that should have no problem opening the file. I ran into the same problem at one time. I didn't have time to follow up because I switched groups at work.

Similar Messages

  • ByteArray.uncompress() problem

    Hello
    Does the uncompress method of ByteArray only supports level 3
    compressed streams? Because I have a valid zlib compressed file but
    compressed in level 2, and Flash always throws me the 2058 error
    message.
    I've also tried using the DefaultCompressionAlgorithm class
    for AIR with its two compression methods, but with no success.
    Doing some quick tests with python using the same file gets
    uncompressed with no problems.

    I am having problems with uncompress as well. See my
    code.

  • GZip Version Problems

    Hello Everyone,
    I have the need to decompress an array of bytes that are given to me in gzip format. The problem that I am facing is that I beleive that the version of gzip that the bytes are compressed with, is different than the version of gzip that is built into the java API. Every time I try to unzip the bytes using GZIPInputStream, I get the error "Not in gzip format." Is there any way I can decompress gzip files compressed with an older version of gzip? Does anyone know the version of Gzip java uses?
    Thanks for all the help
    - Jon
    Here is my decompress code:
    static byte[] Decompress(byte[] buffer) throws IOException
              ByteArrayInputStream bin = new ByteArrayInputStream(buffer);
              GZIPInputStream zip = null;
              try
                   zip = new GZIPInputStream(bin);
                   ByteArrayOutputStream bout = new ByteArrayOutputStream();
                   while(true)
                        int b = zip.read();
                        if(b == -1)
                             break;
                        bout.write(b);
                   return bout.toByteArray();
              finally
                   if (zip != null)
                        zip.close();
         }

    Jpmon1 wrote:
    It is a gzip file, we use a C++ gzip library to compress it. The version of the gzip library in C++ is 1.1. We can decompress it fine through the C++ library.Can't really diagnose the problem if you can't post standalone code. Put your gzip file into a hard-coded byte[] and post that and code that demonstrates the problem.
    EDIT: Also, are you aware there is a difference between gzip the file format, and the underlying compression mechanism (DEFLATE)?
    Edited by: paul.miner on Jan 30, 2008 10:26 AM

  • GZip / GZIPOutputStream problem.

    Hi guys.
    This is my problem:
    I'm getting some information from database, formatting it to a String and sending back to the DB for future use.
    Is there any way to GZip it, store GZipped info in the DB, and when sending to client use GZIPOutputStream ?
    Now I save it as a String, and use this code for outputting:
    GZIPOutputStream gzos = new GZIPOutputStream(response.getOutputStream());
    response.setHeader("Content-Encoding", "gzip");
    gzos.write(sdl.outPut.toString().getBytes());
    gzos.close();
    Any help will be appriciated,
    Thanks in advance, Vadim.

    Thanks.
    But how?
    What should I use for OutputStream?
    When I do gzos.write() it sends it to the response, so I should change this line: GZIPOutputStream(response.getOutputStream()) for something else...
    Any ideas?

  • Not in GZIP format problem

    I am experiencing the following IOException when using the GZIPInputStream:
        java.io.IOException: Not in GZIP format
            at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:131)
            at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58)
            at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68)
            ...I am trying to read an Entity Body from an HTTP response that has been compressed using GZIP compression. I read in chunks of 4K bytes, but my first read always ends at the Entity Body (this is not a problem of course, but I thought it was a bit odd). However, this my first read of an InputStream always gives me the following:
    Status-Line
    Headers
    CRLF
    So, the next read would return me the first byte of the Entity Body. By investigating the supplied Headers I discovered that GZIP compression is used. Therefore, I create a GZIPInputStream with the original InputStream as parameter. But when I start reading from the GZIPInputStream I get the mentioned exception.
    Looking into the GZIPInputStream it seems to have a problem with the GZIP header magic number (0x8b1f). This magic number consists of two bytes. I thought it would be nice to try the following, just to see what happend:
        byte[] gzipHeader = new byte[2];
        inputStream.read(gzipHeader, 0, gzipHeader.length);
        GZIPInputStream gzipInputStream =
            new GZIPInputStream(
                new SequenceInputStream(
                    new ByteArrayInputStream(gzipHeader), inputStream));
        ...And guess what? This seems to solve my problem, however I would not consider this to be a nice fix. Looking to see what is in the byte array, I discovered the following: 0x1f8b. I found the following snippet of code in GZIPInputStream:
        private int readUShort(InputStream in) throws IOException {
            int b = readUByte(in);
            return ((int)readUByte(in) << 8) | b;
        }This method is used to read in the GZIP header magic number. Now correct me if I'm wrong, but reading the bytes 0x1f8b results in the desired 0x8b1f. Therefore my little test mentioned earlier works, but why doesn't the following work:
        GZipInputStream gzipInputStream = new GZIPInputStream(inputStream);
        ....Can anybody help me with this?
    Jack...

    http://en.wikipedia.org/wiki/Gzip
    Other uses
    The �Content-Encoding� header in HTTP/1.1 allows clients to optionally receive compressed HTTP responses and (less commonly) to send compressed requests. The standard itself specifies two compression methods: �gzip� (RFC 1952; the content wrapped in a gzip stream) and �deflate� (RFC 1950; the content wrapped in a zlib-formatted stream). Compressed responses are supported by many HTTP client libraries, almost all modern browsers and both of the major HTTP server platforms, Apache and Microsoft IIS. Many server implementations, however, incorrectly implement the protocol by using the raw DEFLATE stream format (RFC 1951) instead. The bug is sufficiently pervasive that most modern browsers will accept both RFC 1951 and RFC 1950-formatted data for the �deflate� compressed method.

  • Java.io.IOException: Corrupt GZIP trailer

    I have some code to gunzip a byte array of data. I've used this code frequently and it works well. However, I just tried unzipping a byte[] array that is 4,529,218 bytes which expands to a file that is 2,157,763,194 bytes (on an SGI).
    I get a:
    java.io.IOException: Corrupt GZIP trailer
    thrown from the while ( ( length = zipin.read(buffer, 0, sChunk) ) != -1) line below.
    I did a quick Google search and found these links:
    http://www.aoindustries.com/docs/aocode-public/com/aoindustries/util/zip/CorrectedGZIPInputStream.html
    http://www.sanger.ac.uk/Software/Artemis/artemis_docs/uk.ac.sanger.pathogens.WorkingGZIPInputStream.html
    with comments like:
    Works around the "Corrupt GZIP trailer" problem in GZIPInputStream by catching and ignoring this exception.
    A wrapper class to work around a bug in GZIPInputStream. The read() method sometimes throws a IOException complaining about a Corrupt GZIP trailer on the jdk 1.1.8-13 on the Alphas. This wrapper catches and ignores that exception.
    The code below writes out the correct number of bytes to the filesystem, but I get the IOException. From my Google search, it appears that some people have run into this problem before. Does anyone here know if this is a bogus error, or if it is valid? Is this a known "bug" in Java?
    Note: the file size is larger than the Integer.MAX_SIZE. Is there an integer somewhere in the code that checks the trailer that was exceeded because of the file size?
    (I ommited some catch code to make reading it easier)
    private void gunzip(byte[] data, File file)
        int sChunk = 8192;
        // create input stream
        GZIPInputStream zipin;
        try
            ByteArrayInputStream in = new ByteArrayInputStream(data);
            zipin = new GZIPInputStream(in);
        catch (IOException e)
            // omitted for clarity
        byte[] buffer = new byte[sChunk];
        FileOutputStream out = null;
        // decompress the data
        try
            out = new FileOutputStream(file);
            while ( ( length = zipin.read(buffer, 0, sChunk) ) != -1) // error here
                out.write(buffer, 0, length);
        catch (IOException e)
            // omitted for clarity
        finally
            try
                out.close();
                zipin.close();
            catch(IOException e)
                // omitted for clarity
    }

    In GZIPInputStream.java:
         * Reads GZIP member trailer.
        private void readTrailer() throws IOException {
         InputStream in = this.in;
         int n = inf.getRemaining();
         if (n > 0) {
             in = new SequenceInputStream(
                   new ByteArrayInputStream(buf, len - n, n), in);
         long v = crc.getValue();
         if (readUInt(in) != v || readUInt(in) != inf.getTotalOut()) {
             throw new IOException("Corrupt GZIP trailer");
        }This line
    if (readUInt(in) != v || readUInt(in) != inf.getTotalOut())appears to be verifying the CRC value and data size from the trailer with data actually read from the stream.
    The inf.getTotalOut() returns an integer. My file size is greater than a 32 bit integer value.
    I looked at the GZip file specification at:
    http://www.faqs.org/rfcs/rfc1952.html
    and see that the trailer input size is defined as:
    ISIZE (Input SIZE)
                This contains the size of the original (uncompressed) input
                data modulo 2^32.I assume data modulo 2^32 means that this is supposed to be a 32 bit integer.

  • [SOLVED] can't install jbuilder

    Hello!
    When I try to install JBuilder 2005 I get:
    [antek@arch jb2005_linux]$ ./install.bin
    Preparing to install...
    Extracting the JRE from the installer archive...
    Unpacking the JRE...
    Extracting the installation resources from the installer archive...
    Configuring the installer for this system's environment...
    awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
    dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    /bin/ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
    basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    hostname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    Launching installer...
    grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    /tmp/install.dir.7094/Linux/resource/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
    although all the libs he is complaining about are in my /libs dir. . .
    I get similar errors when I try to install JBuilder 2006.
    Anybody knows how to solve this? Or maybe older versions of JBuilder work better?

    You're right. This is whole part of install.bin containing LD_ASSUME_KERNEL commands:
    # set this variable to something so we're guaranteed a value
    linux_LD_ASSUME_KERNEL_hack=0;
    # work around problem on RedHat Linux 7.1 IA-32
    # see Bug Id 4447270 at Sun JDC bug parade
    if [ `cat /etc/redhat-release 2>/dev/null | grep "7.1" | wc -l` = "1" ];
    then
    if [ `uname -s` = "Linux" ];
    then
    if [ `uname -m` != "ia64" ];
    then
    case `uname -r` in
    2.[456]*)
    linux_LD_ASSUME_KERNEL_hack=1
    esac
    fi
    fi
    fi
    # LD_ASSUME_KERNEL for Native POSIX Threading Library on some Linux distros
    if [ `uname` = "Linux" ]; then
    debugOut "checking for NPTL + JVM vulernability..."
    #check libc to see if it was compiled with NPTL
    nptl="`strings /lib/libc.so.6 | grep -i nptl`"
    if [ "$nptl" ]; then
    debugOut "NPTL detected! checking for vulnerable JVM....";
    # I have to set this before I check the JVM version, a-cuz
    # the call will hang, if it -is- vulnerable!
    export LD_ASSUME_KERNEL=2.2.5
    eval `$actvm -version 2>&1 | $AWK '
    BEGIN {
    vendor="Sun"
    /"[0-9].[0-9].[0-9][^"]*"$/ {
    gsub ("["]", "", $3)
    split ($3, ver, "[._-]")
    printf "v_major=%snv_minor=%snv_patch=%sn",ver[1],ver[2],ver[3]
    /IBM/ {
    vendor="IBM"
    END {
    printf "v_vendor=%sn",vendor
    ' `
    # unset the LD_ASSUME_KERNEL in cause we don't need it
    unset LD_ASSUME_KERNEL
    debugOut "major : ${v_major}"
    debugOut "minor : ${v_minor}"
    debugOut "patch : ${v_patch}"
    debugOut "vendor: ${v_vendor}"
    # check our rules for setting LD_ASSUME_KERNEL
    # currently, we're only setting this for JVMS < 1.4
    # we can add more rules later, if we need to.
    if [ ${v_minor:-0} -lt 4 ]; then
    debugOut "Vulnerable JVM detected... implementing workaround"
    linux_LD_ASSUME_KERNEL_hack=1
    else
    debugOut "Your JVM is OK! Congratulations!"
    fi
    fi
    fi
    if [ $linux_LD_ASSUME_KERNEL_hack -eq 1 ]; then
    LD_ASSUME_KERNEL=2.2.5
    export LD_ASSUME_KERNEL
    fi
    I tried to comment the line export LD_ASSUME_KERNEL=2.2.5, but then installer gave me following errors:
    [antek@arch jb2005_linux]$ ./install.bin
    Preparing to install...
    Extracting the JRE from the installer archive...
    Unpacking the JRE...
    gzip: /tmp/install.dir.9748/Linux/resource/vm.tar.Z: corrupt input. Use zcat to recover some data.
    uncompress: /tmp/install.dir.9748/Linux/resource/vm.tar.Z: corrupt input. Use zcat to recover some data.
    gzip: /tmp/install.dir.9748/Linux/resource/vm.tar.Z: corrupt input. Use zcat to recover some data.
    The included VM could not be uncompressed (GZIP/UNCOMPRESS). Please try to
    download the installer again and make sure that you download using 'binary'
    mode. Please do not attempt to install this currently downloaded copy.
    I get similar errors after I uncommented back that line... Does it mean the installation file cannot be edited? It is 100 MB file with long script at the beginning and binary stuff after it. I have no experience with things like this... what to do?

  • Can't even install

    Since the docs just say that it shoudl work and there seems to be no Adobe support that doesn't require a week of "You're sure you're running Contribute?" (24 hours pass) "And you're not using Windows?" (48 hours pass) etc...
    I am trying to install CPS onto a Linux server. This seems to be the way it's supposed to work. It supposedly includes a JRE engine already.
    I would appreciate any help anyone can provide. Adobe has proven itself fairly useless in my opinion. I spent an hour on the phone with them over why the downloader didn't work to find out there IS no downloader. Then they sent me a CD whose documentation consists mainly of links to Macromedia's web site, which is no longer with us. So I can only imagine what the future of this software is.
    I guess one question is whether it assumes I have a graphical user interface? Which would be an odd assumption for a server product.
    Here is what happens.
    me ~> sh cps-linux.bin
    Preparing to install...
    Extracting the JRE from the installer archive...
    Unpacking the JRE...
    Extracting the installation resources from the installer archive...
    Configuring the installer for this system's environment...
    awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
    dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    /bin/ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
    basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    Launching installer...
    grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    ./cps-linux.bin: line 2317: /tmp/install.dir.5665/Linux/resource/jre/bin/java: Permission denied
    ./cps-linux.bin: line 2317: /tmp/install.dir.5665/Linux/resource/jre/bin/java: Success

    Get this message:
    awk: cmd. line:6: warning: escape sequence `\.' treated as plain `.'
    Launching installer...
    ./cps.bin: line 2317: /tmp/install.dir.19547/Linux/resource/jre/bin/java: Permission denied
    ./cps.bin: line 2317: /tmp/install.dir.19547/Linux/resource/jre/bin/java: Success
    If I alter your sed line to  cat cps.bak|sed "s/export LD_ASSUME/#/" > cps.bin
    I get:
    Preparing to install...
    Extracting the JRE from the installer archive...
    Unpacking the JRE...
    gzip: /tmp/install.dir.19782/Linux/resource/vm.tar.Z: not in gzip format
    ./cps.bin: line 569: uncompress: command not found
    gzip: /tmp/install.dir.19782/Linux/resource/vm.tar.Z: not in gzip format
    The included VM could not be uncompressed (GZIP/UNCOMPRESS). Please try to
    download the installer again and make sure that you download using 'binary'
    mode.  Please do not attempt to install this currently downloaded copy.
    It should be noted that I gzipped the bin file, uploaded, and then decompressed just to make sure I wasn't screwing it up.
    I do appreciate your tip and hope you will follow through. This has now taken far too many hours from the "downloader available when you buy but not when you try to download nonsense to my order being lost in Adobe's systems to mistakenly thinking tech support via email would take less than 24-48 hours for each response.

  • Kernel not booting with "alloc magic is broken"

    When I booted my PC for the second time today I suddenly got the following error:
    loading linux vmlinuz26
    alloc magic is broken at 0xcf6fe180
    My first boot was totally fine. I have changed no settings, but I have probably installed some updates. Both the normal arch and the fallback fail to boot. My Windows however does succeed to boot without issues. Does anyone know what causes this?

    Here it is!
    Pacman log:
    [2012-06-17 10:06] Running 'pacman -Syu'
    [2012-06-17 10:06] synchronizing package lists
    [2012-06-17 10:07] starting full system upgrade
    [2012-06-17 10:10] upgraded khrplatform-devel (8.0.3-2 -> 8.0.3-3)
    [2012-06-17 10:10] upgraded lib32-freetype2 (2.4.9-1 -> 2.4.10-1)
    [2012-06-17 10:10] upgraded lib32-krb5 (1.10.1-2 -> 1.10.2-1)
    [2012-06-17 10:10] upgraded libpng (1.5.10-1 -> 1.5.11-1)
    [2012-06-17 10:10] upgraded lib32-libpng (1.5.10-2 -> 1.5.11-1)
    [2012-06-17 10:10] upgraded nvidia-utils (295.59-1 -> 302.17-1)
    [2012-06-17 10:10] upgraded lib32-nvidia-utils (295.59-1 -> 302.17-1)
    [2012-06-17 10:10] upgraded mesa (8.0.3-2 -> 8.0.3-3)
    [2012-06-17 10:10] upgraded lib32-mesa (8.0.3-3.1 -> 8.0.3-3.2)
    [2012-06-17 10:10] upgraded lib32-pango (1.30.0-1 -> 1.30.1-1)
    [2012-06-17 10:10] upgraded libdrm (2.4.33-1 -> 2.4.35-1)
    [2012-06-17 10:10] upgraded libglapi (8.0.3-2 -> 8.0.3-3)
    [2012-06-17 10:10] upgraded libegl (8.0.3-2 -> 8.0.3-3)
    [2012-06-17 10:10] upgraded nvidia (295.59-1 -> 302.17-1)
    [2012-06-17 10:10] upgraded opencl-nvidia (295.59-1 -> 302.17-1)
    grub.cfg
    # DO NOT EDIT THIS FILE
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    ### BEGIN /etc/grub.d/00_header ###
    insmod part_gpt
    insmod part_msdos
    if [ -s $prefix/grubenv ]; then
    load_env
    fi
    set default="2"
    if [ "${prev_saved_entry}" ]; then
    set saved_entry="${prev_saved_entry}"
    save_env saved_entry
    set prev_saved_entry=
    save_env prev_saved_entry
    set boot_once=true
    fi
    function savedefault {
    if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
    fi
    function load_video {
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
    set menu_color_normal=light-blue/black
    set menu_color_highlight=light-cyan/blue
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos3)'
    search --no-floppy --fs-uuid --set=root 5c130a7b-3c93-4d68-9497-dd0e91351f72
    if loadfont /usr/share/grub/unicode.pf2 ; then
    set gfxmode=auto
    load_video
    insmod gfxterm
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos3)'
    search --no-floppy --fs-uuid --set=root 5c130a7b-3c93-4d68-9497-dd0e91351f72
    set locale_dir=($root)/boot/grub/locale
    set lang=en_US
    insmod gettext
    fi
    terminal_input console
    terminal_output gfxterm
    set timeout=5
    ### END /etc/grub.d/00_header ###
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Arch Linux, with Linux vmlinuz26' --class archlinux --class gnu-linux --class gnu --class os {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos3)'
    search --no-floppy --fs-uuid --set=root 5c130a7b-3c93-4d68-9497-dd0e91351f72
    echo 'Loading Linux vmlinuz26 ...'
    linux /boot/vmlinuz26 root=/dev/disk/by-uuid/5c130a7b-3c93-4d68-9497-dd0e91351f72 ro quiet
    echo 'Loading initial ramdisk ...'
    initrd /boot/kernel26.img
    menuentry 'Arch Linux, with Linux vmlinuz26 Fallback' --class archlinux --class gnu-linux --class gnu --class os {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos3)'
    search --no-floppy --fs-uuid --set=root 5c130a7b-3c93-4d68-9497-dd0e91351f72
    echo 'Loading Linux vmlinuz26 ...'
    linux /boot/vmlinuz26 root=/dev/disk/by-uuid/5c130a7b-3c93-4d68-9497-dd0e91351f72 ro quiet init=/bin/systemd
    echo 'Loading initial ramdisk ...'
    initrd /boot/kernel26-fallback.img
    ### END /etc/grub.d/10_linux ###
    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    ### END /etc/grub.d/20_memtest86+ ###
    ### BEGIN /etc/grub.d/30_os-prober ###
    ### END /etc/grub.d/30_os-prober ###
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###
    ### BEGIN /etc/grub.d/40_custom.pacsave ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    menuentry "Windows 7" {
    set root=(hd0,1)
    chainloader (hd0,1)+1
    ### END /etc/grub.d/40_custom.pacsave ###
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f $prefix/custom.cfg ]; then
    source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    initramimage:
    ==> Image: /boot/initramfs-linux.img
    ==> Created with mkinitcpio 0.9.2
    ==> Kernel: 3.4.2-2-ARCH
    ==> Size: 2.12 MiB
    ==> Compressed with: gzip
    -> Uncompressed size: 5.54 MiB (.382 ratio)
    -> Estimated extraction time: 0.085s
    ==> Included modules:
    ahci ext4 libata sd_mod
    cdrom jbd2 mbcache sr_mod
    crc16 libahci scsi_mod
    ==> Included binaries:
    ==> Early hook run order:
    udev
    ==> Hook run order:
    udev
    resume
    ==> Cleanup hook run order:
    udev

  • Problem with Compression (Deflater & GZip)

    Hi All,
    I've large data as a String which I need to save in Oracle in VARCHAR2 column. As Varchar2 allows maximum of 4000 characters, I wish to compress this String and save in DB.
    I tried to compress the String using Delfater and GZip. In both methods I uses Streams concep (DeflaterOutputStream, GZipOutputStream) and both Classes have the option to return the Compressed data in byte[] and String format.
    When I returned in String format, the same String is giving error while decompressing "java.util.zip.ZipException: incorrect data check". How to solve this problem.
    When I tried to save the compressed String in DB (Oracle),
    initially I got the error "java.sql.SQLException: Malformed SQL92 string at position: 1109"
    and later I tried to save like this 'strCompressed.replace("'","''") i.e., I replaced all single quotes to 2-single quotes and the error message is "java.sql.SQLException: ORA-00911: invalid character".
    Is there any character to replace in the compressed String. and how to solve the problem with decompression.
    Please help me in this.
    Thanks in advance.
    Regards
    Pavan Pinnu.

    both Classes have the option to return the Compressed data in byte[] and String format.Don't do that. String is not a container for binary data. You can't use it for compressed data. Use the byte[], send the byte[] to the database, get it back from the database, uncompress it, and then turn that back into a String.

  • Problem when uncompressing using GZIPInputStream

    i uploaded a 2.7MB gzipped byte array into MySQL database. The original file size before compressing was 9.3MB. When I retrieve the file from the database, everything works fine, but after uncompressing it using GZIP, it's only 9.2MB. I compared both the files, both look same in the beginning, but the last bytes are missing in the retrieved file. Here is my code.Can somebody give me some insight?
    byte[] bytes=getFile();
    ByteArrayInputStream bStream=new ByteArrayInputStream(bytes);
    GZIPInputStream iStream=new GZIPInputStream(bStream);
    File file = new File("/home/antn/file/testfile.cel");
    OutputStream oStream=new FileOutputStream(file);
    byte [] buf = new byte[512];
    int len = 0;
    while ( (len=iStream.read(buf))!= -1 )
    oStream.write(buf,0,len);
    iStream.close();
    oStream.close();
    bStream.close();
    Also I am getting this exception whenever I run the program.
    Exception in thread "main" java.io.EOFException: Unexpected end of ZLIB input stream
         at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:216)
         at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:134)
         at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:87)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
    at service.RetrieveFile.main(RetrieveFile.java:93)

    Hey guys,
    Thanks for your help. The problem was in writing to the database. Eventhough I closed all the input and output streams, I didn't flush the output stream and close it immediately. So now its working and thanks again for the great help.

  • Problems with large frame uncompressed AVI files in QT 7 player

    I have just recently gone from QT Pro 6.5.2 to QT Pro 7, mainly because of the HD support.
    I have a dual boot system with QT 7 on Windows 2000, and QT 6 on Windows 98SE.
    I am having problems playing uncompressed AVI files in the QT 7 player, apparently if the frame size is large (in the example case 688 x 516).
    Sometimes I just get "error 108 unknown error" pop up when I try to load the file. Sometimes the file loads but will not play except in short bursts of movement every now and again as it moves along the timeline. Sometimes the file plays, but with one or more broad black lines across the image!
    All the problem files play perfectly in QT 6.5.2, but will not play in QT 7, which should surely play them better, not worse!
    Can anyone make any suggestion as to what's happening?
    I've uninstalled and reinstalled QT 7, which made no difference. I'm sure I don't need any extra codecs, as QT has always played RAW AVIs without anything extra before.
    Thanks in anticipation, Dave.

    I have just recently gone from QT Pro 6.5.2 to QT Pro 7, mainly because of the HD support.
    I have a dual boot system with QT 7 on Windows 2000, and QT 6 on Windows 98SE.
    I am having problems playing uncompressed AVI files in the QT 7 player, apparently if the frame size is large (in the example case 688 x 516).
    Sometimes I just get "error 108 unknown error" pop up when I try to load the file. Sometimes the file loads but will not play except in short bursts of movement every now and again as it moves along the timeline. Sometimes the file plays, but with one or more broad black lines across the image!
    All the problem files play perfectly in QT 6.5.2, but will not play in QT 7, which should surely play them better, not worse!
    Can anyone make any suggestion as to what's happening?
    I've uninstalled and reinstalled QT 7, which made no difference. I'm sure I don't need any extra codecs, as QT has always played RAW AVIs without anything extra before.
    Thanks in anticipation, Dave.

  • Digital noise using Apple 10-bit uncompressed codec for NTSC, BIG PROBLEM!

    I hope someone from Apple or the Shake team can shed some light on this problem we're having so we can take the appropriate corrective action ASAP to meet our strict deadlines on this current project.
    We're compositing all the EFX (over 1000 EXF shots) for a massive video game project that needs to be delivered to the client by the end of May. Let me preface the following comments by saying that overall, we're very pleased with Shake and the end results we're getting, but one problem in particular has us very worried about making our deadline:
    The project is entirely bluescreen with CGI plates, shot on anamorphic Digibeta and captured into FCP as uncompressed 10 bit. 4:2:2 through a Blackmagic HD Extreme card (via SDI).
    All the 4:2:2 material exhibits (for lack of a better desciption) digital "noise" that runs along the right-hand edge of the video, with frequent drop-out "looking" sparkles that can appear anywhere in the video image. These artifacts ONLY appear when the video clips are imported into Shake, and rendered out of Shake. They play perfectly fine in FCP and QT player.
    If we force the FILE-IN node to 8 bit, the problem goes away, but keying suffers - so this is not an option.
    The problem ONLY occurs on our Intel Mac's, not on our older G5's. The reason we invested in the Mac Pro's for this project was to reap the performance boost we desired in order to get the project out the door by our deadline, plus the G5's are busy offlining upcoming episodes - so turning the compositing over to the G5's is also not an option.
    We're already well down the road, and while we realize that at Shake's current price-point it seems silly to complain at all, we gladly would have paid more for a compositing tool if we knew we were going to run into a situation like this. Unforunately, our initial evaluation of Shake was done on our G5's which don't suffer from this issue.
    If anyone from has any recommendation for an efficient way to solve or work around this issue, we'd love to hear from you.
    Best regards,
    Michael Buday

    Not sure the exact answer, but some options to try:
    1) have you tried converting the clips to image
    sequences? Perhaps it's a QuickTime error.
    2) How about using 2 FileIns - one at 10 bit to
    generate the keys and one at 8 bit for the fill?
    Patrick
    <img</div>
    Hello Patrick and thanks for your suggestion:
    We're going to experiment with different codecs and image sequences this week to see what happens.
    RE: using different FILEIN's for key/fill, is something I hadn't thought of but unfortunately the 10bit FILEIN would still be affected by the noise which would in turn affect the alpha channel created by Keylight or Primatte.
    I'll let you know what we find out as things progress.
    Again, thanks.
    Michael
    G5 Dual 1.8 GHZ   Mac OS X (10.4.3)   FCP 5.03, STO 1.01

  • Gzip-1.5-1 error uncompressing temporary file in lynx

    Today updated gzip to 1.5-1-i686.  Thereafter in lynx 2.8.7-5 no websites would display.  The message is "error uncompressing temporary file."  I reverted to gzip 1.4-4 and lynx works as expected.

    There is a bugtracker...

  • Uncompressed 8-bit Preset problems

    Hi,
    I'm trying to solve a jaggy text problem by creating a new uncompressed 8-bit sequence (which I've never used before).
    I try using the preset for Uncompressed 8-bit and click OK... but then I get the following message:
    "Video Compressor Uncompressed 8-bit 4:2:2 was not found. Please check that the hardware is present and enabled for this compressor. Setting the video to Animation."
    I'm not sure what this means. Do I need a better Video Card? (My friend has FCP 5 on his old 867MHz Powerbook and it works fine on that... so I can't see how my dual 1 GHz doesn't have the right hardware...).
    Please advise if you have encountered this error...
    Thanks.
    G

    The file... it's not a file but an edited sequence... I "captured" it using firewire DV preset... miniDV consumer camera.
    Edited the whole show into a 30 second sequence.
    Was trying to put superimposed title graphics which were "jaggy"
    Someone suggested creating an uncompressed sequence and then cutting in the DV sequence and graphics into it...
    But I couldn't create the uncompressed sequence.
    I tried creating a brand new project using the uncompressed preset... and got the same error message.
    G

Maybe you are looking for

  • No ringback from cisco ip phones to alcatel Phones

    I have a CUCM 7.1.3 integrated with a Alcatel OXO PBX and when a try to place a call from cisco IP-Phones registered on CUCM to phones on PBX, I have no ringback,but  when a place a call from cisco IP-Phones registered on CUCM to PSTN using PBX as it

  • Single Source Authoring

    Hi - I'm in the process of evaluating various eLearning solutions specific to the capturing of applications (either web-based or desktop apps), with the following criteria: 1 - need to be able to produce multiple playback modes, including: show me, g

  • FIM CM Logon failure: unknown user name or bad password. (Exception from HRESULT: 0x8007052E)

    Hi, I am trying to install FIM Certificate management 2010. I am not able to access the CM Web portal. Whenever I login it shows the following error Logon failure: unknown user name or bad password. (Exception from HRESULT: 0x8007052E) This is the CM

  • Need oo abap material

    hi i am beginner to oo abap. can anyone send me material regarding this subject. thanks in advance.

  • 64 bit windows on Mac Pro

    If I use Bootcamp to install a 64 bit version of windows xp pro on a Mac will that allow windows to make full use of the ram installed? I understand that 32 bit versions of win xp only allow access to 4 gigs or so of ram? I take it that the processor