javaimplementation for multiple files in 7z?

Help
2005-04-29
2013-05-28
  • Torsten Kunkel
    Torsten Kunkel
    2005-04-29

    Hi,

    I'm looking how to get the javaimplementation work with a 7z-archive including serveral files.
    At the moment I'm using the java.util.zip-package but 7z is very interesing because of the much better compression.
    Using zip I could handle the diffrent files by:

    ZipFile zipfile = new ZipFile("my.zip");
    ZipEntry entry = zipFile.getEntry(element.getChildText("filename"));

    and then simply:
    InputStream is = zipFile.getInputStream(entry);

    in the lzma-packing this "lzmaEntry" is missing, it looks like only streams are supported.
    Does anyone know how tohandle a 7z-file like:
    7z:
    \1.txt
    \2.txt
    \3.txt
    using java?

    Greetings

    Torsten

     
    • my space
      my space
      2005-04-29

      > in the lzma-packing this "lzmaEntry" is missing, it looks like only streams are supported.

      Yes the LZMA-packing is a port of the C++ LZMA SDK that supports only LZMA streams ...

      Remark : ZipEntry entry = zipFile.getEntry(element.getChildText("filename"));
      is not efficient for solid archive like 7-zip ...

       
    • Torsten Kunkel
      Torsten Kunkel
      2005-04-29

      :/ I already thought something like this.
      Thank you for your answer.

      So.. no lzma for this programm :/