<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: savezip utility	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/savezip-utility/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/savezip-utility?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=savezip-utility</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Thu, 02 Sep 2021 14:28:20 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/savezip-utility#comment-511518</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 02 Sep 2021 14:28:20 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4982#comment-511518</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/savezip-utility#comment-511467&quot;&gt;Thomas&lt;/a&gt;.

Try to use a filename with &lt;code&gt;.gz&lt;/code&gt; extension - this will use &lt;code&gt;GZIPOutputStream&lt;/code&gt; instead of &lt;code&gt;ZipOutputStream&lt;/code&gt; to compress the data, and perhaps it will solve the problem. If not, split your data into 2 separate parts and save/load them separately.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/savezip-utility#comment-511467">Thomas</a>.</p>
<p>Try to use a filename with <code>.gz</code> extension &#8211; this will use <code>GZIPOutputStream</code> instead of <code>ZipOutputStream</code> to compress the data, and perhaps it will solve the problem. If not, split your data into 2 separate parts and save/load them separately.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Thomas		</title>
		<link>https://undocumentedmatlab.com/articles/savezip-utility#comment-511467</link>

		<dc:creator><![CDATA[Thomas]]></dc:creator>
		<pubDate>Sun, 22 Aug 2021 11:28:16 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4982#comment-511467</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/savezip-utility#comment-509785&quot;&gt;Yair Altman&lt;/a&gt;.

Thanks Yair, and sorry I&#039;ve not been warned of your answer.

I&#039;m facing again the issue, even when increasing this Matlab setting to its maximum (8,159Mb). I guess the issue is completely independent from the savezip function right? Is there a way to use another type of memory allowing to save such a big file without relying on Matlab&#039;s internal java memory limit?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/savezip-utility#comment-509785">Yair Altman</a>.</p>
<p>Thanks Yair, and sorry I&#8217;ve not been warned of your answer.</p>
<p>I&#8217;m facing again the issue, even when increasing this Matlab setting to its maximum (8,159Mb). I guess the issue is completely independent from the savezip function right? Is there a way to use another type of memory allowing to save such a big file without relying on Matlab&#8217;s internal java memory limit?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/savezip-utility#comment-509785</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 20 Jan 2021 08:07:37 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4982#comment-509785</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/savezip-utility#comment-509784&quot;&gt;Thomas&lt;/a&gt;.

You can try to increase the Java heap memory size in the Matlab preferences (General =&gt; Java Heap Memory). Any changes to the settings will only take effect after restarting Matlab.
&lt;a href=&quot;https://www.mathworks.com/help/matlab/matlab_external/java-heap-memory-preferences.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://www.mathworks.com/help/matlab/matlab_external/java-heap-memory-preferences.html&lt;/a&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/savezip-utility#comment-509784">Thomas</a>.</p>
<p>You can try to increase the Java heap memory size in the Matlab preferences (General => Java Heap Memory). Any changes to the settings will only take effect after restarting Matlab.<br />
<a href="https://www.mathworks.com/help/matlab/matlab_external/java-heap-memory-preferences.html" target="_blank" rel="nofollow">https://www.mathworks.com/help/matlab/matlab_external/java-heap-memory-preferences.html</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Thomas		</title>
		<link>https://undocumentedmatlab.com/articles/savezip-utility#comment-509784</link>

		<dc:creator><![CDATA[Thomas]]></dc:creator>
		<pubDate>Wed, 20 Jan 2021 06:37:30 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4982#comment-509784</guid>

					<description><![CDATA[Hello, thanks for sharing! I currently receive the following memory error message when using savezip with a big object (Matlab R2020b, Windows 10).
&lt;pre&gt;
Error using java.util.zip.ZipOutputStream/write
MATLAB array exceeds an internal Java limit.
Error in savezip (line 90)
    zos.write(dataInBytes, 0, numel(dataInBytes)); 
&lt;/pre&gt;

Would you have an idea how the internal java memory limit can be increased?]]></description>
			<content:encoded><![CDATA[<p>Hello, thanks for sharing! I currently receive the following memory error message when using savezip with a big object (Matlab R2020b, Windows 10).</p>
<pre>
Error using java.util.zip.ZipOutputStream/write
MATLAB array exceeds an internal Java limit.
Error in savezip (line 90)
    zos.write(dataInBytes, 0, numel(dataInBytes)); 
</pre>
<p>Would you have an idea how the internal java memory limit can be increased?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Holger Hoffmann		</title>
		<link>https://undocumentedmatlab.com/articles/savezip-utility#comment-359375</link>

		<dc:creator><![CDATA[Holger Hoffmann]]></dc:creator>
		<pubDate>Tue, 20 Oct 2015 20:02:38 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4982#comment-359375</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/savezip-utility#comment-356374&quot;&gt;Yair Altman&lt;/a&gt;.

Thanks for clarifying. That&#039;s what I guessed. However, it is possible in Java to read and write into or out of a gzipped csv-file in the format of old-school spreadsheet (e.g. Excel-compatible). So shouldn&#039;t it be possible with MatLab via Java too? Perhaps that would require to mimick the &quot;writetable&quot; somehow. Unfortunately I currently dont have the time to continue with this, but it would still be super great, if someone figures this out.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/savezip-utility#comment-356374">Yair Altman</a>.</p>
<p>Thanks for clarifying. That&#8217;s what I guessed. However, it is possible in Java to read and write into or out of a gzipped csv-file in the format of old-school spreadsheet (e.g. Excel-compatible). So shouldn&#8217;t it be possible with MatLab via Java too? Perhaps that would require to mimick the &#8220;writetable&#8221; somehow. Unfortunately I currently dont have the time to continue with this, but it would still be super great, if someone figures this out.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/savezip-utility#comment-356374</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 03 Sep 2015 11:24:46 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4982#comment-356374</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/savezip-utility#comment-356366&quot;&gt;Holger Hoffmann&lt;/a&gt;.

You will need to manually extract your data into CSV format from Matlab&#039;s table object. There is no direct way of doing that other than using &lt;i&gt;&lt;b&gt;writetable&lt;/b&gt;&lt;/i&gt;.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/savezip-utility#comment-356366">Holger Hoffmann</a>.</p>
<p>You will need to manually extract your data into CSV format from Matlab&#8217;s table object. There is no direct way of doing that other than using <i><b>writetable</b></i>.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Holger Hoffmann		</title>
		<link>https://undocumentedmatlab.com/articles/savezip-utility#comment-356366</link>

		<dc:creator><![CDATA[Holger Hoffmann]]></dc:creator>
		<pubDate>Thu, 03 Sep 2015 08:50:45 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4982#comment-356366</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/savezip-utility#comment-356237&quot;&gt;Yair Altman&lt;/a&gt;.

Dear Yair,

thanks for the quick response. Your code works perfectly fine. My problem is, that the file written is a gzipped mat-file. At least, if I uncompress it with some other program than matlab, I cannot interpret it easily. For a specific application, I need to have a gzipped csv-file (table). That means, if I gunzip it with some other program, it should give a common csv-file. Now, I guess that is possible with your code. But I don&#039;t understand how. Could you please give an example? This would really be helpful and boost my performance a lot.

Thanks again.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/savezip-utility#comment-356237">Yair Altman</a>.</p>
<p>Dear Yair,</p>
<p>thanks for the quick response. Your code works perfectly fine. My problem is, that the file written is a gzipped mat-file. At least, if I uncompress it with some other program than matlab, I cannot interpret it easily. For a specific application, I need to have a gzipped csv-file (table). That means, if I gunzip it with some other program, it should give a common csv-file. Now, I guess that is possible with your code. But I don&#8217;t understand how. Could you please give an example? This would really be helpful and boost my performance a lot.</p>
<p>Thanks again.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/savezip-utility#comment-356237</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Mon, 31 Aug 2015 18:04:39 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4982#comment-356237</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/savezip-utility#comment-356200&quot;&gt;Holger Hoffmann&lt;/a&gt;.

@Holger - read the article carefully: I explained how you can serialize any Matlab data (including tables) into a byte stream that can then be compressed into a zip/gz file. You can use the &lt;i&gt;savezip&lt;/i&gt; utility for this as explained in the article.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/savezip-utility#comment-356200">Holger Hoffmann</a>.</p>
<p>@Holger &#8211; read the article carefully: I explained how you can serialize any Matlab data (including tables) into a byte stream that can then be compressed into a zip/gz file. You can use the <i>savezip</i> utility for this as explained in the article.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Holger Hoffmann		</title>
		<link>https://undocumentedmatlab.com/articles/savezip-utility#comment-356200</link>

		<dc:creator><![CDATA[Holger Hoffmann]]></dc:creator>
		<pubDate>Sun, 30 Aug 2015 21:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4982#comment-356200</guid>

					<description><![CDATA[Great post - thx all!

Would you know a way to write a table directly to a zip/gz-file instead of writetable() to csv and subsequenly compressing it? As far as I know, in Java that&#039;s possible. 

Any help is greatly appreciated.]]></description>
			<content:encoded><![CDATA[<p>Great post &#8211; thx all!</p>
<p>Would you know a way to write a table directly to a zip/gz-file instead of writetable() to csv and subsequenly compressing it? As far as I know, in Java that&#8217;s possible. </p>
<p>Any help is greatly appreciated.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Péter Masa		</title>
		<link>https://undocumentedmatlab.com/articles/savezip-utility#comment-336656</link>

		<dc:creator><![CDATA[Péter Masa]]></dc:creator>
		<pubDate>Fri, 07 Nov 2014 07:42:14 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4982#comment-336656</guid>

					<description><![CDATA[Similarly, it would be great to zip/unzip data into/from a Matlab variable, e.g.
&lt;pre lang=&#039;matlab&#039;&gt;
&gt;&gt; b = zip(a);
&gt;&gt; a = unzip(b);

&gt;&gt; whos a b
  Name         Size                 Bytes  Class    Attributes
  a         1024x1024             1048576  uint8              
  b            1x65536              65536  uint8  
&lt;/pre&gt;

This could be an invaluable tool when we want to keep in memory large amount of redundant data for maximum speed data access, e.g. picking rapidly images from thousands-of-images-database, which exceed the size of memory when it&#039;s uncompressed.]]></description>
			<content:encoded><![CDATA[<p>Similarly, it would be great to zip/unzip data into/from a Matlab variable, e.g.</p>
<pre lang='matlab'>
>> b = zip(a);
>> a = unzip(b);

>> whos a b
  Name         Size                 Bytes  Class    Attributes
  a         1024x1024             1048576  uint8              
  b            1x65536              65536  uint8  
</pre>
<p>This could be an invaluable tool when we want to keep in memory large amount of redundant data for maximum speed data access, e.g. picking rapidly images from thousands-of-images-database, which exceed the size of memory when it&#8217;s uncompressed.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
