<?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: About rle_unpack in libevecache</title>
	<atom:link href="http://yannramin.com/2009/12/28/about-rle_unpack-in-libevecache/feed/" rel="self" type="application/rss+xml" />
	<link>http://yannramin.com/2009/12/28/about-rle_unpack-in-libevecache/</link>
	<description>Software and life</description>
	<lastBuildDate>Sat, 10 Jul 2010 10:45:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Cadde</title>
		<link>http://yannramin.com/2009/12/28/about-rle_unpack-in-libevecache/comment-page-1/#comment-1453</link>
		<dc:creator>Cadde</dc:creator>
		<pubDate>Tue, 16 Mar 2010 15:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://yannramin.com/?p=332#comment-1453</guid>
		<description>Sorry for double comment...

But of course this stripped the spacetastic formatting i had used so it might not make any sense at all... Try and copy+pasting it into a monospace font editor and adding the spaces back to it.</description>
		<content:encoded><![CDATA[<p>Sorry for double comment&#8230;</p>
<p>But of course this stripped the spacetastic formatting i had used so it might not make any sense at all&#8230; Try and copy+pasting it into a monospace font editor and adding the spaces back to it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cadde</title>
		<link>http://yannramin.com/2009/12/28/about-rle_unpack-in-libevecache/comment-page-1/#comment-1452</link>
		<dc:creator>Cadde</dc:creator>
		<pubDate>Tue, 16 Mar 2010 15:15:11 +0000</pubDate>
		<guid isPermaLink="false">http://yannramin.com/?p=332#comment-1452</guid>
		<description>I have been working on a VB.NET (Don&#039;t laugh dammit) version of libevecache and because it STILL took me hours to figure this one out i think it&#039;s only valid to post my methodology for solving the problem.

This is a copy+paste of the commented code in my VB project.

	&#039; Observe this methodology for example...
	&#039; 
	&#039; BZero &amp; BLen        0100        1000                0001                                    0111      0001                     0100         0011
	&#039; TZero &amp; TLen        1000        1111                0000                                    1010      1010                     1000         1011
	&#039; Operation Bytes     48          8F                  10                                      7A        1A                       48           3B
	&#039; Data Bytes            CF 1413 04                       2440 C0E6 7F39 66B3 CA01 4617 EA58 0A        01        109F 9303 B496 98   9AD3 C901           1579 FF7F 0E
	&#039; Result              00CF 1413 0400 0000 0000 0000 0000 2440 C0E6 7F39 66B3 CA01 4617 EA58 0A00 0000 0100 0000 109F 9303 B496 9800 9AD3 C901 0000 0000 1579 FF7F 0E
	&#039; ZERO&#039;s added        1           9                                                           3         3                        1            4
	&#039; Data bytes copied     4                                15                                           1         7                   4                   5
	&#039;
	&#039; TZero, TLen deals with the first 4 bits of the operation byte.
	&#039; BZero, BLen deals with the last 4 bits of the operation byte.
	&#039;
	&#039; TZero is the 4th bit and if it&#039;s set it means it should ADD X number of &amp;h00 bytes to the result.
	&#039; TLen is the number of Zero&#039;s (+1) to add if the TZero flag is set.
	&#039; If TZero isn&#039;t set then instead of adding null bytes it takes the following (8 - BLen) bytes and adds to the result.
	&#039;	
	&#039; This is repeated with BZero and BLen respectively.
	&#039;
	&#039; So, for the first byte in the compressed row (&amp;h48) TZero is set and we add TLen(0) + 1 = 1, null bytes to the result.
	&#039; BZero is not set so we copy 8 - BLen(4) = 4, bytes from the compressed data row.
	&#039;
	&#039; We now read the next operand byte and here TZero is set so we insert TLen(7) + 1 = 8, null bytes to the result.
	&#039; BZero is also set so we insert another BLen(0) + 1 = 1, null bytes to the result.
	&#039;
	&#039; Since the last operation only inserted null bytes (9 of them in total) we simply read the next operand.
	&#039; TZero isn&#039;t set so we copy 8 - TLen(0) = 8, bytes from the compressed row.
	&#039; BZero isn&#039;t set so we copy 8 - BLen(1) = 7, bytes from the compressed row.
	&#039; This means we copied (8 + 7) 15 bytes from the compressed row.
	&#039;
	&#039; That is half the compressed row done, i leave the rest up to you to grasp.

Hope this helps someone.</description>
		<content:encoded><![CDATA[<p>I have been working on a VB.NET (Don&#8217;t laugh dammit) version of libevecache and because it STILL took me hours to figure this one out i think it&#8217;s only valid to post my methodology for solving the problem.</p>
<p>This is a copy+paste of the commented code in my VB project.</p>
<p>	&#8216; Observe this methodology for example&#8230;<br />
	&#8216;<br />
	&#8216; BZero &amp; BLen        0100        1000                0001                                    0111      0001                     0100         0011<br />
	&#8216; TZero &amp; TLen        1000        1111                0000                                    1010      1010                     1000         1011<br />
	&#8216; Operation Bytes     48          8F                  10                                      7A        1A                       48           3B<br />
	&#8216; Data Bytes            CF 1413 04                       2440 C0E6 7F39 66B3 CA01 4617 EA58 0A        01        109F 9303 B496 98   9AD3 C901           1579 FF7F 0E<br />
	&#8216; Result              00CF 1413 0400 0000 0000 0000 0000 2440 C0E6 7F39 66B3 CA01 4617 EA58 0A00 0000 0100 0000 109F 9303 B496 9800 9AD3 C901 0000 0000 1579 FF7F 0E<br />
	&#8216; ZERO&#8217;s added        1           9                                                           3         3                        1            4<br />
	&#8216; Data bytes copied     4                                15                                           1         7                   4                   5<br />
	&#8216;<br />
	&#8216; TZero, TLen deals with the first 4 bits of the operation byte.<br />
	&#8216; BZero, BLen deals with the last 4 bits of the operation byte.<br />
	&#8216;<br />
	&#8216; TZero is the 4th bit and if it&#8217;s set it means it should ADD X number of &amp;h00 bytes to the result.<br />
	&#8216; TLen is the number of Zero&#8217;s (+1) to add if the TZero flag is set.<br />
	&#8216; If TZero isn&#8217;t set then instead of adding null bytes it takes the following (8 &#8211; BLen) bytes and adds to the result.<br />
	&#8216;<br />
	&#8216; This is repeated with BZero and BLen respectively.<br />
	&#8216;<br />
	&#8216; So, for the first byte in the compressed row (&amp;h48) TZero is set and we add TLen(0) + 1 = 1, null bytes to the result.<br />
	&#8216; BZero is not set so we copy 8 &#8211; BLen(4) = 4, bytes from the compressed data row.<br />
	&#8216;<br />
	&#8216; We now read the next operand byte and here TZero is set so we insert TLen(7) + 1 = 8, null bytes to the result.<br />
	&#8216; BZero is also set so we insert another BLen(0) + 1 = 1, null bytes to the result.<br />
	&#8216;<br />
	&#8216; Since the last operation only inserted null bytes (9 of them in total) we simply read the next operand.<br />
	&#8216; TZero isn&#8217;t set so we copy 8 &#8211; TLen(0) = 8, bytes from the compressed row.<br />
	&#8216; BZero isn&#8217;t set so we copy 8 &#8211; BLen(1) = 7, bytes from the compressed row.<br />
	&#8216; This means we copied (8 + 7) 15 bytes from the compressed row.<br />
	&#8216;<br />
	&#8216; That is half the compressed row done, i leave the rest up to you to grasp.</p>
<p>Hope this helps someone.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.211 seconds -->
