<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[unsigned int binär in 1 bzw. 2 Byte speichern]]></title><description><![CDATA[<p>Hallo.</p>
<p>Ich suche nach einer Möglichkeit einen <code>unsigned int</code> -Wert in einer Binärdatei mit nur 1 bzw. 2 Byte zu speichern, anstatt der üblichen 4 Byte zu speichern.</p>
<p>Weiß einer wie das geht?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/302280/unsigned-int-binär-in-1-bzw-2-byte-speichern</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 10:01:45 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/302280.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 15 Apr 2012 10:22:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to unsigned int binär in 1 bzw. 2 Byte speichern on Sun, 15 Apr 2012 10:22:42 GMT]]></title><description><![CDATA[<p>Hallo.</p>
<p>Ich suche nach einer Möglichkeit einen <code>unsigned int</code> -Wert in einer Binärdatei mit nur 1 bzw. 2 Byte zu speichern, anstatt der üblichen 4 Byte zu speichern.</p>
<p>Weiß einer wie das geht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2202148</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2202148</guid><dc:creator><![CDATA[Die erinnerung]]></dc:creator><pubDate>Sun, 15 Apr 2012 10:22:42 GMT</pubDate></item><item><title><![CDATA[Reply to unsigned int binär in 1 bzw. 2 Byte speichern on Sun, 15 Apr 2012 10:27:57 GMT]]></title><description><![CDATA[<p><code>unsigned char</code> bzw. <code>unsigned short</code> ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2202151</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2202151</guid><dc:creator><![CDATA[Caligulaminus]]></dc:creator><pubDate>Sun, 15 Apr 2012 10:27:57 GMT</pubDate></item><item><title><![CDATA[Reply to unsigned int binär in 1 bzw. 2 Byte speichern on Sun, 15 Apr 2012 10:30:37 GMT]]></title><description><![CDATA[<p>Ok. Und wie speichere ich die binär? (Mit <code>write()</code> ?)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2202156</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2202156</guid><dc:creator><![CDATA[Die erinnerung]]></dc:creator><pubDate>Sun, 15 Apr 2012 10:30:37 GMT</pubDate></item><item><title><![CDATA[Reply to unsigned int binär in 1 bzw. 2 Byte speichern on Sun, 15 Apr 2012 10:34:59 GMT]]></title><description><![CDATA[<blockquote>
<p>Mit <code>write()</code> ?</p>
</blockquote>
<p>Zum Beispiel.</p>
<p>Oder <code>put()</code> für einzelne Bytes.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2202158</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2202158</guid><dc:creator><![CDATA[Caligulaminus]]></dc:creator><pubDate>Sun, 15 Apr 2012 10:34:59 GMT</pubDate></item><item><title><![CDATA[Reply to unsigned int binär in 1 bzw. 2 Byte speichern on Sun, 15 Apr 2012 12:00:03 GMT]]></title><description><![CDATA[<p>MMn kannst du keine Dateien erzeugen, die weniger Bytes haben als die Blockgröße des Dateisystems ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2202173</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2202173</guid><dc:creator><![CDATA[pyhax]]></dc:creator><pubDate>Sun, 15 Apr 2012 12:00:03 GMT</pubDate></item><item><title><![CDATA[Reply to unsigned int binär in 1 bzw. 2 Byte speichern on Sun, 15 Apr 2012 12:09:04 GMT]]></title><description><![CDATA[<p>pyhax schrieb:</p>
<blockquote>
<p>MMn kannst du keine Dateien erzeugen, die weniger Bytes haben als die Blockgröße des Dateisystems ist.</p>
</blockquote>
<p>Blödsinn.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2202174</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2202174</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Sun, 15 Apr 2012 12:09:04 GMT</pubDate></item><item><title><![CDATA[Reply to unsigned int binär in 1 bzw. 2 Byte speichern on Sun, 15 Apr 2012 13:11:00 GMT]]></title><description><![CDATA[<p>Aber gibt es nicht trotzdem eine minimal Dateigröße?</p>
<p>EDIT:</p>
<p><a href="http://linux.about.com/od/lsa_guide/a/gdelsa35t04.htm" rel="nofollow">http://linux.about.com/od/lsa_guide/a/gdelsa35t04.htm</a> schrieb:</p>
<blockquote>
<p>For example, if you set your block size to 4096, or 4K, and you create a file that is 256 bytes in size, it will still consume 4K of space on your harddrive. For one file that may seem trivial, but when your filesystem contains hundreds or thousands of files, this can add up.</p>
</blockquote>
<p>Ich weiß jetzt aber nicht, ob das immer so ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2202185</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2202185</guid><dc:creator><![CDATA[pyhax]]></dc:creator><pubDate>Sun, 15 Apr 2012 13:11:00 GMT</pubDate></item><item><title><![CDATA[Reply to unsigned int binär in 1 bzw. 2 Byte speichern on Sun, 15 Apr 2012 13:10:11 GMT]]></title><description><![CDATA[<p>Nein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2202189</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2202189</guid><dc:creator><![CDATA[SG1]]></dc:creator><pubDate>Sun, 15 Apr 2012 13:10:11 GMT</pubDate></item><item><title><![CDATA[Reply to unsigned int binär in 1 bzw. 2 Byte speichern on Sun, 15 Apr 2012 15:34:24 GMT]]></title><description><![CDATA[<p>Nein, ist nicht so.<br />
Die Datei ist so groß wie sie sein muss!<br />
Ich hab den theoretischen Bedarf ausgerechnent und mit dem reellen Verglichen. Das stimmt bis auf ein paar Bytes überein. Und ich vermute diese Bytes kommen daher, dass ich mich einfach verechnet habe.</p>
<p>Vielen Dank!</p>
<p>Und wie kann man wieder einzelne Bytes einlesen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2202224</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2202224</guid><dc:creator><![CDATA[Die erinnerung]]></dc:creator><pubDate>Sun, 15 Apr 2012 15:34:24 GMT</pubDate></item></channel></rss>