Activity for 7-Zip-JBinding

  • Ilia S Ilia S posted a comment on discussion Open Discussion

    It works correctly with FileOutputStream with parameter 'true'. result = item.extractSlow(new ISequentialOutStream() { @SneakyThrows public int write(byte[] data) throws SevenZipException { FileOutputStream wr = null; try { wr = new FileOutputStream("c:\\Users\\1\\tt.pdf", true); wr.write(data); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { if (wr != null) {...

  • Ilia S Ilia S posted a comment on discussion Open Discussion

    Please describe your decision. I faced the same problem. Thanks

  • Hardik Hardik posted a comment on discussion Help

    please refer this file for extraction :

  • Hardik Hardik posted a comment on discussion Help

    Hi , I am trying to extract files from ZIP which contains ¥ [YEN SIGN] on Linux machine . surprisingly , child files contains ¥ are replaced by [space]/[square] . Referred example : https://gist.github.com/borisbrodski/6120309 I had tried possible approached to change character BY : if(path.contains("")){ path = path.replaceAll("", "¥"); } and try { byte[] charset = path.getBytes("UTF-8"); path = new String(charset, "UTF-8"); }catch (UnsupportedEncodingException e1) { throw new SevenZipException("Error...

  • akanksha akanksha modified a comment on discussion Help

    please find attachment JVM crashes giving error java/lang/NoClassDefFoundError': net/sf/sevenzipjbinding/ExtractAskMode> (0x00000005ea79e890) thrown at [/home/ec2-user/workspace/zulu8-build-linux64/zulu-src.git/hotspot/src/share/vm/classfile/systemDictionary.cpp, line 209]. sevenzipbinding 16.02-2.01 version i am using, both jar (sevenzipjbinding-all-linux,sevenzipjbinding )present in classpath. still its giving such error. could you please why this is giving such error. @Override boolean scan(String...

  • akanksha akanksha modified a comment on discussion Help

    please find attachment JVM crashes giving error java/lang/NoClassDefFoundError': net/sf/sevenzipjbinding/ExtractAskMode> (0x00000005ea79e890) thrown at [/home/ec2-user/workspace/zulu8-build-linux64/zulu-src.git/hotspot/src/share/vm/classfile/systemDictionary.cpp, line 209]. sevenzipbinding 16.02-2.01 version i am using, both jar (sevenzipjbinding-all-linux,sevenzipjbinding )present in classpath. still its giving such error. could you please why this is giving such error. @Override boolean scan(String...

  • akanksha akanksha modified a comment on discussion Help

    please find attachment JVM crashes giving error java/lang/NoClassDefFoundError': net/sf/sevenzipjbinding/ExtractAskMode> (0x00000005ea79e890) thrown at [/home/ec2-user/workspace/zulu8-build-linux64/zulu-src.git/hotspot/src/share/vm/classfile/systemDictionary.cpp, line 209]. sevenzipbinding 16.02-2.01 version i am using both jar present in classpath. still its giving such error. could you please why this is giving such error. @Override boolean scan(String fileName, InputStream inputStream) throws...

  • akanksha akanksha modified a comment on discussion Help

    please find attachment JVM crashes giving error java/lang/NoClassDefFoundError': net/sf/sevenzipjbinding/ExtractAskMode> (0x00000005ea79e890) thrown at [/home/ec2-user/workspace/zulu8-build-linux64/zulu-src.git/hotspot/src/share/vm/classfile/systemDictionary.cpp, line 209]. sevenzipbinding 16.02-2.01 version i am using both jar present in classpath. still its giving such error. could you please why this is giving such error. @Override boolean scan(String fileName, InputStream inputStream) throws...

  • akanksha akanksha posted a comment on discussion Help

    please find attachment JVM crashes giving error java/lang/NoClassDefFoundError': net/sf/sevenzipjbinding/ExtractAskMode> (0x00000005ea79e890) thrown at [/home/ec2-user/workspace/zulu8-build-linux64/zulu-src.git/hotspot/src/share/vm/classfile/systemDictionary.cpp, line 209]. sevenzipbinding 16.02-2.01 version i am using both jar present in classpath. still its giving such error. could you please why this is giving such error. @Override boolean scan(String fileName, InputStream inputStream) throws...

  • 7-Zip-JBinding 7-Zip-JBinding updated /OldFiles/sevenzipjbinding-it-test-pack.zip

  • Henry Carhuas Balvin Henry Carhuas Balvin created ticket #30

    Error Fatal Multi-Process 7zip

  • Henry Carhuas Balvin Henry Carhuas Balvin posted a comment on discussion Help

    Hi Boris. In case, thank you very much for all your contribution with this solution. I have been facing a problem in the simultaneous execution of my project when trying to compress different files in different executions. And getting a FATAL ERROR that doesn't let me catch the error or be able to do anything. I have tried these 2 actions. 1) Instantiate the 7Zip object only once when starting my project. SevenZip.initSevenZipFromPlatformJAR(); 2) Add execution parameters to the Java -Jar command...

  • Astha Astha modified a comment on discussion Help

  • Astha Astha posted a comment on discussion Help

    Thanks, I'm able to extract gzip and bzip2 files now with your help.

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hey, how did you solve it? There is nothing to solve. It works like this: You have test.txt file When you compress your file to bzip2 you get test.txt.bz2 In the file content there is no name "test.txt" encoded This means, if you rename your file to abc.bz2 it will be not possible to recover the original name "test.txt". Extracting "abc.bz2" with 7z would you give file "abc", not "test.txt". I hope, it helps clarify situation.

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Actually, it should be pretty straight forward. Just extract gz into a temporary file, then open it and extract again.

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    It would be cool to write such code and share it. But don't have something working out of the box yet. I created an issue https://github.com/borisbrodski/sevenzipjbinding/issues/53

  • Astha Astha posted a comment on discussion Help

    "You have to extract this Gzip archive first and then open the result again." can you share code for this?

  • Astha Astha posted a comment on discussion Help

    Hey, how did you solve it? Which property of bzip2 file did you use? If every value was blank? I'm also stuck... unablw to extract bzip2 and gzip files cc: @boris_brodski

  • Astha Astha posted a comment on discussion Help

    Hi Akanksha, Do youb know how can I extract gzip/bzip files? The PropID.PATH is coming is blank in casexof extracting gzip & bzip2 files.

  • Astha Astha posted a comment on discussion Open Discussion

    I have found the solution. Can close this

  • Astha Astha posted a comment on discussion Open Discussion

    I'm using an Android wrapper over 7Zip-Jbinding and facing an issue with compressing files other than .txt. I tried picking mp4 and .docx files from my assets folder(in Android project) and found that the zip is created sucessfully but when I tried opening the compressed files after extracting, I'm unable to do so seems the files are corrupted. However same is file with .txt files. Also the obtained files are under directoy strtucre as that of asset folder from where I picked my files. Can't we compress...

  • Astha Astha modified a comment on discussion Open Discussion

    @boris_brodski I'm using an Android wrapper over 7Zip-Jbinding and facing an issue with compressing files other than .txt. I tried picking mp4 and .docx files from my assets folder(in Android project) and found that the zip is created sucessfully but when I tried opening the compressed files after extracting, I'm unable to do so seems the files are corrupted. However same is fine with .txt files. Also the obtained files are under directoy strtucre as that of asset folder from where I picked my files....

  • Astha Astha posted a comment on discussion Open Discussion

    @boris_brodski I'm using an Android wrapper over 7Zip-Jbinding and facing an issue with compressing files other than .txt. I tried picking mp4 and .docx files from my assets folder(in Android project) and found that the zip is created sucessfully but when I tried opening the compressed files after extracting, I'm unable to do so seems the files are corrupted. However same is file with .txt files. Also the obtained files are under directoy strtucre as that of asset folder from where I picked my files....

  • zgpinguo zgpinguo created ticket #29

    jvm get a fatal error

  • Boris Brodski Boris Brodski posted a comment on discussion Open Discussion

    Hi Ami, I don't see any good alternative. what you can do: you can start the extraction of one item, then throw an exception after some bytes were extracted and passed to write () method to stop the process. Then try the next item. Cheers Boris

  • Ami tazi Ami tazi modified a comment on discussion Open Discussion

    consider an example of an unencrypted 7z archives that contain a 200GB encrypted sub archives each one with their own password Is there any way to check if a password is correct for the sub items without extracting them ?

  • Ami tazi Ami tazi posted a comment on discussion Open Discussion

    consider an example of an unencrypted 7z archives that contain encrypted sub archives each one with their own password Is there any way to check if a password is correct for the sub items without extracting them ?

  • unnati unnati posted a comment on discussion Help

    i have change the code. but still i am getting this error Error: SevenZipJBinding couldn't be initialized automaticly using initialization from platform depended JAR and the default temporary directory. Please, make sure the correct 'sevenzipjbinding-<platform>.jar' file is on the class path or consider initializing SevenZipJBinding manualy using one of the offered initialization methods: 'net.sf.sevenzipjbinding.SevenZip.init*()</platform> Please help me how to resolve this issue.

  • unnati unnati posted a comment on discussion Help

    i have change the code. but still i am getting this error Error: SevenZipJBinding couldn't be initialized automaticly using initialization from platform depended JAR and the default temporary directory. Please, make sure the correct 'sevenzipjbinding-<platform>.jar' file is on the class path or consider initializing SevenZipJBinding manualy using one of the offered initialization methods: 'net.sf.sevenzipjbinding.SevenZip.init*()</platform> Please help me how to resolve this issue.

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Ok, your code has a big problem. The method write of the ISequentialOutStream get called multiple times for one archive item. Imagine, you have a file 1T in size that you want to extract. It is impossible to put 1T in one Java array. So the write() method get called many times passing chunks of the file to you.

  • unnati unnati posted a comment on discussion Help

    No. thanks for the reply. please find the below code public class GZFileExtractor { public static void extract(String file, String extractPath) throws SevenZipException, IOException, SevenZipNativeInitializationException, InterruptedException { IInArchive inArchive = null; RandomAccessFile randomAccessFile = null; System.out.println("Extracting gz file: source : " +file + " extract path : " +extractPath); try { //sevenZipJBindingInitCheck(); System.out.println("Extracting gz file:"); randomAccessFile...

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hi, are you using 7-Zip-JBinding in mutli-task an environment? (Multiple java processes)

  • unnati unnati posted a comment on discussion Help

    Hi, Please help me. I am using 16.02-2.01 version. I am trying to extract .gz file. code is working fine on my Window pc. But when i deploy the application on open shift server i m getting below error. java.lang.RuntimeException: Could not store the file. Error: SevenZipJBinding couldn't be initialized automaticly using initialization from platform depended JAR and the default temporary directory. Please, make sure the correct 'sevenzipjbinding-<platform>.jar' file is on the class path or consider...

  • akanksha akanksha modified a comment on discussion Open Discussion

    i am using sevenzipjbinding-AllLinux.jar and sevenzipjbinding.jar (sevenzipjbinding-16.02-2.01-AllLinux) in linux OS Centos 6.6. and I am getting SevenZipJBinding wasn't initialized successfully last time error. could some one suggest how to fix this. and doesnt it initialize automaically ?

  • akanksha akanksha modified a comment on discussion Open Discussion

    i am using sevenzipjbinding-AllLinux.jar and sevenzipjbinding.jar (sevenzipjbinding-16.02-2.01-AllLinux) in linux OS 64 bit. and I am getting SevenZipJBinding wasn't initialized successfully last time error. could some one suggest how to fix this. and doesnt it initialize automaically ?

  • akanksha akanksha modified a comment on discussion Open Discussion

    i am using sevenzipjbinding-AllLinux.jar and sevenzipjbinding.jar in linux OS 64 bit. and I am getting SevenZipJBinding wasn't initialized successfully last time error. could some one suggest how to fix this. and doesnt it initialize automaically ?

  • akanksha akanksha posted a comment on discussion Open Discussion

    i am using sevenzipjbinding-AllLinux.jar and sevenzipjbinding.jar in linux OS. and I am getting SevenZipJBinding wasn't initialized successfully last time error. could some one suggest how to fix this. and doesnt it initialize automaically ?

  • akanksha akanksha modified a comment on discussion Help

    Hi , public static void extract(InputStream is) throws IOException { Map<String, InputStream> extractedMap = new HashMap<>(); if (!is.markSupported()) { is = new BufferedInputStream(is); } is.mark(Integer.MAX_VALUE); ByteArrayStream b=new ByteArrayStream(IOUtils.toByteArray(is), true); is.reset(); IInArchive inArchive = SevenZip.openInArchive(null, b); for (ISimpleInArchiveItem item : inArchive.getSimpleInterface().getArchiveItems()) { if (!item.isFolder()) { ExtractOperationResult result = item.extractSlow(data...

  • akanksha akanksha posted a comment on discussion Help

    Hi , public static void extract(InputStream is) throws IOException { Map<String, InputStream> extractedMap = new HashMap<>(); if (!is.markSupported()) { is = new BufferedInputStream(is); } is.mark(Integer.MAX_VALUE); ByteArrayStream b=new ByteArrayStream(IOUtils.toByteArray(is), true); is.reset(); IInArchive inArchive = SevenZip.openInArchive(null, b); for (ISimpleInArchiveItem item : inArchive.getSimpleInterface().getArchiveItems()) { if (!item.isFolder()) { ExtractOperationResult result = item.extractSlow(data...

  • akanksha akanksha posted a comment on discussion Help

    thanks @boris_brodski for quick response

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    You asked about ZIP files :) is there any method which check given zip file is password protected or not For 7z and RAR archives this approach should be extended as following: - Use your own implementation of IArchiveOpenCallback that also implements ICryptoGetTextPassword - Try to open archive - If successful, the 7z or RAR archive itself is not password protected - If cryptoGetTextPassword() get called, the entire archive is password protected Now proceed with the same stratagy extracting archive...

  • akanksha akanksha posted a comment on discussion Help

    please find 7z file, i tried above mentioned approach but unable to open this file because this 7z file itself password protected . if 7z file contains any Password protected files then we can go for this approach . but if 7z file itself is password protected , how can check for this ByteArrayStream byteStream = new ByteArrayStream(IOUtils.toByteArray(is), true); inArchive = SevenZip.openInArchive(null, // autodetect archive type byteStream); System.out.println(" Hash | Size | Filename"); System.out.println("----------+------------+---------");...

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hello, hm, I might be useful, but no, we don't have it. But you can just try to open an archive and then extract first item (implementing both IArchiveExtractCallback and ICryptoGetTextPassword in your callback ) . If you get asked for the password, the archive item is password protected and you can cancel the extraction process by throwing an exception. Keep in mind, that some archive items might be password protected and some not. Cheers, Boris

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hello Akanksha, you don't need to have a file on the system in order to extract an archive with 7-Zip-JBinding. But InputStream is not enough. Extracting archives, like RAR, involves jumping through data. Java InputStream unfortunatelly allows only sequential access to the data. The best way is to implement InStream interface with read and seek method. Cheers, Boris

  • akanksha akanksha modified a comment on discussion Help

    I am trying to extract Rar5 archive file using sevenzipjbinding-all-platforms-16.02-2.01.jar and sevenzipjbinding-16.02-2.01.jar. public static Map<inputstream, string=""> extract(String filePath, String password) throws IOException { Map<inputstream, string=""> extractedMap = new HashMap<>();</inputstream,></inputstream,> RandomAccessFile randomAccessFile = new RandomAccessFile(filePath, "r"); RandomAccessFileInStream randomAccessFileStream = new RandomAccessFileInStream(randomAccessFile); IInArchive...

  • akanksha akanksha modified a comment on discussion Help

    I am trying to extract Rar5 archive file using sevenzipjbinding-all-platforms-16.02-2.01.jar and sevenzipjbinding-16.02-2.01.jar. public static Map<inputstream, string=""> extract(String filePath, String password) throws IOException { Map<inputstream, string=""> extractedMap = new HashMap<>();</inputstream,></inputstream,> RandomAccessFile randomAccessFile = new RandomAccessFile(filePath, "r"); RandomAccessFileInStream randomAccessFileStream = new RandomAccessFileInStream(randomAccessFile); IInArchive...

  • akanksha akanksha posted a comment on discussion Help

    I am trying to extract Rar5 archive file using sevenzipjbinding-all-platforms-16.02-2.01.jar and sevenzipjbinding-16.02-2.01.jar. public static Map<inputstream, string=""> extract(String filePath, String password) throws IOException { Map<inputstream, string=""> extractedMap = new HashMap<>();</inputstream,></inputstream,> RandomAccessFile randomAccessFile = new RandomAccessFile(filePath, "r"); RandomAccessFileInStream randomAccessFileStream = new RandomAccessFileInStream(randomAccessFile); IInArchive...

  • Malgorzatap9 Malgorzatap9 posted a comment on discussion Help

    Hi, Is there an option or will be to use 7-zip-JBinding to open files packed with tar with option J (meaning xz)? Cuz I have a code just like examples and unpacking tar files is OK, but files packed this way: tar -cJvf archive.tar.xz file it is impossible. Would be greatful for reply.

  • javaLearn javaLearn posted a comment on discussion Help

    Thanks Boris!

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hello, I never tried it, but it may work, since it's designed to be cross-platform. Do you have Java JDK 8, gcc and cmake for AIX? If yes,jJust give it a try by building it from source. I can help you by problems, that may arise. Cheers, Boris

  • javaLearn javaLearn posted a comment on discussion Help

    does 7-Zip-JBinding work on AIX?

  • s2131 s2131 modified a comment on discussion Help

    I even see: [1.907s][info][class,load] net.sf.sevenzipjbinding.IInStream source: file:/...%5Ctarget%5Cquarkus-app%5Clib%5Cmain%5Cnet.sf.sevenzipjbinding.sevenzipjbinding-16.02-2.01.jar but then it still complains about missing class... Another funny thing is that it crashes when I use archive format 7-zip, but works when I use plain ZIP format :(

  • s2131 s2131 posted a comment on discussion Help

    I even see: [1.907s][info][class,load] net.sf.sevenzipjbinding.IInStream source: file:/...%5Ctarget%5Cquarkus-app%5Clib%5Cmain%5Cnet.sf.sevenzipjbinding.sevenzipjbinding-16.02-2.01.jar but then it still complains about missing class...

  • s2131 s2131 posted a comment on discussion Help

    Hi, I am using a SevenZipJBind together with Quarkus and while extraction of archive works flawlessly, archive creation crashes JVM with following error (-verbose enabled): [99.543s][info][class,load] net.sf.sevenzipjbinding.IOutStream source: file:/...%5Ctarget%5Cquarkus-app%5Clib%5Cmain%5Cnet.sf.sevenzipjbinding.sevenzipjbinding-16.02-2.01.jar [99.544s][info][class,load] net.sf.sevenzipjbinding.impl.RandomAccessFileOutStream source: file:/...%5Ctarget%5Cquarkus-app%5Clib%5Cmain%5Cnet.sf.sevenzipjbinding.sevenzipjbinding-16.02-2.01.jar...

  • Vladimir Vladimir posted a comment on discussion Help

    Hello Boris, sorry for my late response on your response) is there any good news about new release?

  • Janek3 Janek3 posted a comment on discussion Help

    Hello Boris, I've attached this package to this message. I hope it can be available for you. If there is any problem I can send it to any other your e-mail address. Best regards, Janek

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hello Janek, I'm glad, you have a working version now! If you could send it back to me, it would be cool. I expect more people to be interested in it. You can also publish it on your own resource and I will direct other users to it. As you wish :) Thank you! Kind regards, Boris

  • Janek3 Janek3 posted a comment on discussion Help

    Hello Boris, I have compiled succesfully the newest version of Sevenzipjbinding 16.02-2.01-Linux-amd64 on my old Linux CentOS 5.11. Andi it is working. Thank you for all your help. If you want I could send you my builded package sevenzipjbinding-16.02-2.01-Linux-amd64.zip so it can be used for other old Linux users. Best regards, Janek

  • Janek3 Janek3 posted a comment on discussion Help

    Hello Boris, Aaaa, ok. I wish you successfull on this. I will try to compile it on my environment. I found exact description how to do it in file "README" in chapter "6.1 Compile on Linux", so I will do it step by step. Thank you for your help and for all your answers. Best regards, Janek

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hello Janek, I between couple of month and a year. It is hard and it also depends on availability of gcc-docker images with the correct configuration. So hard to predict. I have not only this problem with the builds, but also some other problems, that all should be solved with one build. Keep in mind, that I build 7-Zip-JBinding for multiple platforms and with each release the number of platforms increases. Building 7-Zip-JBinding locally for only one Linux shouldn't be very easy. It has no dependencies....

  • Janek3 Janek3 posted a comment on discussion Help

    Hello Boris, "I'm working on a new build process, that should produce correct binaries." Correct binaries means binaries that will work on my environment? When you think, you will finish that? Best regards, Janek

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hello Janek, I don't think, its possible. It was a test build that proved not to satisfy requirements. So the build configuration wasn't saved. I'm working on a new build process, that should produce correct binaries. But you can build it yourself. On your system it will be automatically correct for you. Just download the source code and build it using cmake. Best regards, Boris

  • Janek3 Janek3 posted a comment on discussion Help

    Hello Boris, I have no influence on the JVM version. Is there possibility to build a 64 bit version of that library? Best regards, Janek

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hey Janek, Yes, its 32 bit library. Just try 32 bit JVM on your ARM64 Linux. Kind regards, Boris

  • Janek3 Janek3 posted a comment on discussion Help

    Hello Boris, It's still a problem. java -jar Test7z-1.0-SNAPSHOT.jar net.sf.sevenzipjbinding.SevenZipNativeInitializationException: 7-Zip-JBinding initialization failed: Error loading native library: '/tmp/SevenZipJBinding-lHcBaRQG5OxY/lib7-Zip-JBinding.so' at net.sf.sevenzipjbinding.SevenZip.loadNativeLibraries(SevenZip.java:650) at net.sf.sevenzipjbinding.SevenZip.initSevenZipFromPlatformJARIntern(SevenZip.java:456) at net.sf.sevenzipjbinding.SevenZip.initSevenZipFromPlatformJAR(SevenZip.java:340)...

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hello Janek, thank you for the bug report. It's "known issue". For i386 I have a test build, that worked at least for some people. You can try it: https://sourceforge.net/projects/sevenzipjbind/files/OldFiles/JDownloader-i386-old-linux-problem/sevenzipjbinding-16.02-2.01-Linux-i386-gnu%2B%2B03-and-multiarch%3Dno.zip/download Kind regards, Boris

  • Janek3 Janek3 posted a comment on discussion Help

    Hi, I'm trying to load sevenzipbibding library (16.02-2.01) on Linux (CentOS 5.11; java version "1.6.0_41") and I obtain an error: java -jar Test7z-1.0-SNAPSHOT.jar net.sf.sevenzipjbinding.SevenZipNativeInitializationException: 7-Zip-JBinding initialization failed: Error loading native library: '/tmp/SevenZipJBinding-Qh9xZZgZzGj1/lib7-Zip-JBinding.so' at net.sf.sevenzipjbinding.SevenZip.loadNativeLibraries(SevenZip.java:650) at net.sf.sevenzipjbinding.SevenZip.initSevenZipFromPlatformJARIntern(SevenZip.java:456)...

  • rs030877 rs030877 posted a comment on discussion Help

    JavaDoc of ByteArrayStream: *net.sf.sevenzipjbinding.util.ByteArrayStream.ByteArrayStream(int maxSize) Create new empty instance of ByteArrayStream specifying maximal length of the stored data. Parameters:maxSize maximal length of the stored data. Use Integer.MAXVALUE to disable maximal length constraint.* I used the following because i needed an unbounded array: ByteArrayStream result = new ByteArrayStream(Integer.MAX_VALUE); But I get java.lang.OutOfMemoryError: Java heap space when I reach the...

  • rs030877 rs030877 posted a comment on discussion Help

    Hi Boris, i implemented what we discussed but i always get: HRESULT: 0x80004002 (No interface). Error creating 'zip' archive with 1 items at net.sf.sevenzipjbinding.impl.OutArchiveImpl.nativeUpdateItems(Native Method) at net.sf.sevenzipjbinding.impl.OutArchiveImpl.doUpdateItems(OutArchiveImpl.java:124) at net.sf.sevenzipjbinding.impl.OutArchiveImpl.createArchive(OutArchiveImpl.java:132) at bdi.ist.orbishistorical.sevenzipjbinding.runnable.ArchiveChunksCompressor.compressChunks(ArchiveChunksCompressor.java:132)...

  • Janek3 Janek3 posted a comment on discussion Help

    Hello, I'm trying to use new library sevenzipjbinding v.16.02-2.01 on CentOS 5.11 amd64. Unfortunately on call SevenZip.initSevenZipFromPlatformJAR(); I have exception: /tmp/SevenZipJBinding-Qh9xZZgZzGj1/lib7-Zip-JBinding.so: ELF file OS ABI invalid I found solution in topic https://sourceforge.net/p/sevenzipjbind/bugs/22/ and file to download here: https://sourceforge.net/projects/sevenzipjbind/files/OldFiles/JDownloader-i386-old-linux-problem/ but unfortunately I have AMD64 architecture. Can you...

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hi Rob, BlockingQueue sounds good for me. Just be careful with the read and write methods of sequential streams. These methods are not always consume or produce the entire given array. Here is a quote from the read()-docs: This function is allowed to read less than number of remaining bytes in stream and less then data.length. You must call read() function in loop, if you need exact amount of data. Best regards, Boris

  • rs030877 rs030877 posted a comment on discussion Help

    Hi Boris, First of all, thank you for your quick reply. Moreover, the library is very useful especially now that unrar has been removed from centos/redhat distros. This morning, after my post, I read one of your replies and thought of using BlockingQueue to implement Producer/Consumer logic with two different threads. In this way, I'll extract and compress the first chunk creating the first version of the compressed file (createArchive function), then I'll append the following chunks using the updateArchive...

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hi, yes, 7-Zip-JBinding was designed with such capabilities in mind. In order to do this you don't need ByteArrayStream. The trick is to use two threads: producer and consumer. Producer thread extracts your original archive and produces 4096 bytes of extracted content. Consumer wait for 4096 bytes to become ready, then it compresses it. You have to keep track of overall process, stop the threads on the end-of-file and also pass some properties around, like file names and file sizes. Please, read...

  • rs030877 rs030877 posted a comment on discussion Help

    Hi Klaus, could you, please, share your solution? I catched the same exception. Thank you in advance

  • rs030877 rs030877 posted a comment on discussion Help

    Hi Boris and all, my requirement is to change compression method of multivolume files having a huge total dimension ( about 150Gb uncompressed) from RAR to ZIP. I can't use CLI programs and commands like unrar, unar in pipe with gzip or similar, so I thought to use Java and I found SevenZipJBinding that solved my task using RandomAccessFile to extract and then compress a phisical file on disk. I used ExtractCallback and CreateCallback and it finished the job in about forty minutes for a 25Gb file...

  • 7-Zip-JBinding 7-Zip-JBinding released /OldFiles/JDownloader-ARM/sevenzipjbinding-16.02-2.01-Linux-armel-v5-build-on-debian-jessie.zip

  • Boris Brodski Boris Brodski modified ticket #19

    Support ISO c++

  • Boris Brodski Boris Brodski posted a comment on ticket #19

    This should work with the current version. Please, reopen, if you find further problems.

  • Boris Brodski Boris Brodski modified a comment on ticket #12

    Great, feel free to reopen the ticket, if you need futher support.

  • Boris Brodski Boris Brodski modified ticket #12

    Support for LZMA2

  • Boris Brodski Boris Brodski modified ticket #12

    Support for LZMA2

  • Boris Brodski Boris Brodski posted a comment on ticket #12

    Great, fill free to reopen the ticket, if you need futher support.

  • William Rantis William Rantis posted a comment on ticket #12

    Ah, sorry. I tried extracting with 7z and found that the dataerror I was getting was the same as with 7-zip-JBinding. I was previously getting unsupportedmethod when I tried to open the password protected archive without a password. Getting a dataerror must be because using of using a wrong password with an encrypted file while the file headers aren't encrypted.

  • Boris Brodski Boris Brodski posted a comment on ticket #12

    Hello William, LZMA2 is supported. If you have any extraction issues, please: try the last version: 16.02-2.01. try to manually extract your file with the corresponding 7z version (16.02) If it is a 7-Zip-JBinding and not 7z problem: Upload your file, so I can reproduce the problem (or create another one showing the same effect) Post relevant code snippets Cheers, Boris

  • William Rantis William Rantis created ticket #12

    Support for LZMA2

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hello Vladimir, sorry for late response. Just read your post. There is no close method on the call back. "sevenZip.ExtractCallbackFromSevenZip" is your class, right. I think, 7-Zip-JBinding holds reference to the last passed callback. I will check and fix it in the upcoming next release. Kind regards, Boris Brodski

  • Vladimir Vladimir modified a comment on discussion Help

    Hello! Thanks for your project. I wanna ask, I have problem with cleaning heap of application after extraction file. try( IInStream inStream = new RandomAccessFileInStream( file ); IInArchive inArchive = SevenZip.openInArchive( null, inStream ) ) { ExtractCallbackFomSevenZip extractCallbackFomSevenZip = new ExtractCallbackFromSevenZip( inArchive, outputDirectoryFile ); inArchive.extract( null, test, extractCallbackFomSevenZip ); inArchive.close(); And after successful extraction, i can see in the...

  • Vladimir Vladimir modified a comment on discussion Help

    Hello! Thanks for your project. I wanna ask, I have problem with cleaning heap of application after extraction file. try( IInStream inStream = new RandomAccessFileInStream( file ); IInArchive inArchive = SevenZip.openInArchive( null, inStream ) ) { ExtractCallbackFomSevenZip extractCallbackFomSevenZip = new ExtractCallbackFromSevenZip( inArchive, outputDirectoryFile ); inArchive.extract( null, test, extractCallbackFomSevenZip ); inArchive.close(); And after successful extraction, i can see in the...

  • Vladimir Vladimir posted a comment on discussion Help

    Hello! Thanks for your project. I wanna ask, I have problem with cleaning heap of application after extraction file. try( IInStream inStream = new RandomAccessFileInStream( file ); IInArchive inArchive = SevenZip.openInArchive( null, inStream ) ) { ExtractCallbackFomSevenZip extractCallbackFomSevenZip = new ExtractCallbackFromSevenZip( inArchive, outputDirectoryFile ); inArchive.extract( null, test, extractCallbackFomSevenZip ); And after successful extraction, i can see in the heap dump of app,...

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hi, I would say, that the recompression is the only way to go. Although it might be technically possible to reuse compressed data, there is no API as I would know of to implement it at this moment. For small archives it is easy to use in-memory extraction and compression. You can use ByteArrayStream for each archive item. For large archives the simple way to extract everything into "/tmp" and recompress it later on (saving and reusing all attributes) Avoiding writing all the files to the disk may...

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hi, I would say, that the recompression is the only way to go. Although it might be technically possible to reuse compressed data, there is no API as I would know of to implement it at this moment. For small archives it is easy to use in-memory extraction and compression. You can use ByteArrayStream for each archive item. For large archives the simple way to extract everything into "/tmp" and recompress it later on (saving and reusing all attributes) Avoiding writing all the files to the disk may...

  • tsubus tsubus modified a comment on discussion Help

    Hi, I want to create a script that takes password-protected archives (the password is known) and removes the password. What would be the best way to go about this? Is there a way to do it without extracting and re-compressing without password? Thank you in advance for any feedback.

  • tsubus tsubus posted a comment on discussion Help

    Hi, I want to create a script that takes password-protected archives (the password is known) and removes it. What would be the best way to go about this? Is there a way to do it without extracting and re-compressing? Thank you in advance for any feedback.

  • Silas De Munck Silas De Munck posted a comment on discussion Help

    Hello Boris, I think you can just use an URLClassloader (to load the sevenzip jars), set it as the context classloader from the current thread and then let it load SevenZip things from another class afterwards? Just make sure your classes are not on the system classloader classpath? That should trigger the crash without spring? If you want, I can try to come up with something as well. A check in the init routines would definitely be a good start to prevent the jvm crashing afterwards. Can the 'no...

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hi Silas, good questions. I think it all depends on compressors. Using lzma or zip or other compression you may get different behavior. But I would expect following behavior: getStream(int index) get called at most ones for each index All streams CAN be closed in setOperationResult() both in OK and ERROR case Due to some errors setOperationResult() may be not called, all stream SHOULD be closed in the "finally" block around the 7-zip createArchive() or updateArchive() call. In OK case all streams...

  • Boris Brodski Boris Brodski posted a comment on discussion Help

    Hello, you are right. A better error message is needed here. Although there are also other reasons possible. If no classes can be found, not crashing JVM and returning control to the java code can be very tricky. I could add an simple class loading test in the initialization routine, where detecting such errors is easier. Any idea how I could test it in a simple way and without using spring? (I could implement my own classloader, but may be you are aware of some existing simple implementations) Thank...

  • Silas De Munck Silas De Munck posted a comment on discussion Help

    Hello Boris, Thanks for your response. This workaround is kind of ok, but would it be possible to give a more sensible error or exception? Currently, this issue crashes the JVM, and I saw in your source code that you do that to get a stacktrace from the jvm? However, here it only crashes with that text "Crash jvm to get a stack trace" and then the process exits. Would be nice to have an exception, or initialization check, or callback to handle this properly from the java side? Kind regards, Silas...

1 >