Truezip returning unsupported compression method error when extracting large files - truezip

Truezip 6 and 7 returning error message "compression method 9 is not supported" when extracting any files greater then 2GB that were compressed using windows compressing method.
(This is achieve by highlighting the file that is 2GB or bigger and then right clicking on the mouse -> send to->Compressed (zipped) folder).
using Truezip 7 code below:
TFile srcFile = new TFile(src, incPath);
TFile dstFile = new TFile(dst);
TFile.cp_rp(srcFile, dstFile, TArchiveDetector.NULL);
produces the error "compression method 9 is not supported" when it hits the "..truezip.zip.RawZipFile.getInputStream". Is there a way to fix this? or a method to overcome this issue?
This only happens when using windows zipped method, however when using 7Zip to compress files that is greater then 2GB and then using truezip to extract isn't a problem.

Method 9 is an extended Deflater method with a bigger dictionary. As the exception says, it isn't supported because the JRE doesn't support it. It seems to be new that the Windows Explorer is using this method.

Related

How to decode a large bytes synchronously (excel file)

I am using excel package version 2.0.0-null-safety-3 to read an excel file,
For small files, it looks good
But when reading a large file, the interface stops until the file is read
Excel.decodeBytes(_bytes);
decodeBytes method => sync is not supported
Is there a way to make the process synchronous
To be able to show the (download bar or waiting dialog) to the user
Thanks in advance.
Use Compute For Large Bytes of Data
await compute(function,param)
Flutter Compute

Unable to parse MP4 files -MemoryAllocationException: Tried to allocate X bytes, but the limit for this record type is:Y

I am using Tika server to fetch metadata and contents of various file formats. I am using server with fileUrl enabled.
When parsing .mov file which are created using quicktime screen record, it gives me the following error.
Text extraction failed (null) org.apache.tika.exception.TikaException:
Unexpected RuntimeException from
org.apache.tika.parser.mp4.MP4Parser#354bc1a2 at
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:293)
at
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
Caused by: org.mp4parser.MemoryAllocationException: Tried to allocate
1399026269 bytes, but the limit for this record type is: 536870912. If
you believe this file is not corrupt, please open a ticket on github
to increase the maximum allowable size for this record type. at
org.mp4parser.tools.MemoryUtils.allocateByteBuffer(MemoryUtils.java:30)
at org.mp4parser.support.AbstractBox.parse(AbstractBox.java:100) at
org.mp4parser.AbstractBoxParser.parseBox(AbstractBoxParser.java:115)
The size of the file is just 20Mb. Other type of .mov files with
content-type="video/quicktime"
is getting parsed with out any error. I connected the debug port and i see that it fails when converting to new IsoFile().
Any help to fix this is highly appreciated.
I start the server as shown below.
java -jar tikaserver-1.24.1.jar -enableFileUrl -enableUnsecureFeatures

Programmatically find COM and LPT address in Matlab

I am using Matlab to program an experiment.
In particular, I am using these lines of code to read and send triggers to an external device:
ioObj = io64;
status = io64(ioObj);
io64(ioObj,portWriteAddress,0);
I have found the value for 'portWriteAddress by navigating to:
Device manager -> Ports -> LPT1 -> Resources. Then, in Resources there is an entry called I/O Range/ Settings with a code like 02S7 - 02SS (something like that).
Then I have converted it from Hex to Dec and put it in the line above.
THE PROBLEM IS: I am running this experiment on several different computers. Is there a way to programmatically find this range (or address) information fromMatlab?
Thank you all for your time.
Gluce
P.S.
The OS that I am using is Windows 7 (it should be soon updated to windows 10).
The computers are running either Matlab 2015b or 2016b.

Issues with Movie2Avi

I'm trying to make a movie in the following way:
x=linspaces(1,10,100);
For i=1:100
plot(x,sin(x))
M(i)=getframe;
end
movie2avi(M,'MOVIE01');
I get a response:
Warning: Cannot locate Indeo5 compressor, using 'None' as the compression type.
it makes the movie but I cannot open it ( gives an error)
I'm using windows 7 64 bit operation system and matlab 2012b
I've tryed the compression types in the documentation but recieved an error for all of them
From the docs:
On some Windows systems, including all 64-bit systems, the default Indeo® 5 codec is not available. MATLAB issues a warning, and creates an uncompressed file.
It would be better to use VideoWriter, which I believe you should have in 2012b.

Why does this code work successfully with Enumerator.fromFile?

I wrote the file transferring code as follows:
val fileContent: Enumerator[Array[Byte]] = Enumerator.fromFile(file)
val size = file.length.toString
file.delete // (1) THE FILE IS TEMPORARY SO SHOULD BE DELETED
SimpleResult(
header = ResponseHeader(200, Map(CONTENT_LENGTH -> size, CONTENT_TYPE -> "application/pdf")),
body = fileContent)
This code works successfully, even if the file size is rather large (2.6 MB),
but I'm confused because my understanding about .fromFile() is a wrapper of fromCallBack() and SimpleResult actually reads the file buffred,but the file is deleted before that.
MY easy assumption is that java.io.File.delete waits until the file gets released after the chunk reading completed, but I have never heard of that process of Java File class,
Or .fromFile() has already loaded all lines to the Enumerator instance, but it's against the fromCallBack() spec, I think.
Does anybody knows about this mechanism?
I'm guessing you are on some kind of a Unix system, OSX or Linux for example.
On a Unix:y system you can actually delete a file that is open, any filesystem entry is just a link to the actual file, and so is a file handle which you get when you open a file. The file contents won't become unreachable /deleted until the last link to it is removed.
So: it will no longer show up in the filesystem after you do file.delete but you can still read it using the InputStream that was created in Enumerator.fromFile(file) since that created a file handle. (On Linux you actually can find it through the special /proc filesystem which, among other things, contains the filehandles of each running process)
On windows I think you will get an error though, so if it is to run on multiple platforms you should probably check test your webapp on windows as well.