Error using gunzip function
5 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have been using gunzip to process large quantities of data as shown below. I have about 100,000 files per year and 14 years to do.
This does exactly what I need - decompresses the .gz file and returns it to the original folder using exactly the same name but in .dat format.
files=gunzip('*.gz');
I have successfully (and very slowly) decompressed the first 7 years worth. However, I now keep getting the following error:
Error using gunzip>gunzipwrite (line 234)
Unexpected end of input stream when attempting to GUNZIP the file "metoffice-c-band-rain-radar_uk_201103071320_1km-composite.dat".
Error in gunzip>gunzipEntries (line 154)
names{k} = gunzipwrite(entries(k).file, outputDir, baseName, streamCopier);
Error in gunzip (line 90)
names = gunzipEntries(entries, outputDir);
Error in open2011 (line 1)
files=gunzip('*.gz');
Is there anything I can do to fix this error? When I restart the code, it decompresses the files that have already been decompressed and stops at the same error eventually.
Also, any suggestions in terms of speeding up the decompression process would be great. Also, it might be worth noting that I am using a mac.
Thanks in advance.
6 件のコメント
Walter Roberson
2018 年 5 月 13 日
I recommend using an external unzip instead of using gunzip(). gunzip() uses java methods and so is limited to java efficiency and has runs the risk of exceeding allocated java memory.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Import and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!