<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node.git/lib/buffer.js, branch fix/orangemocha-readable-stuff</title>
<subtitle>github.com: joyent/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/'/>
<entry>
<title>buffer: return uint if MSB is 1 in readUInt32</title>
<updated>2014-04-10T21:22:05+00:00</updated>
<author>
<name>goussardg</name>
<email>guillaume.goussard@mgo.com</email>
</author>
<published>2014-04-09T23:39:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=8e823bcbe6543acac17cff790f6f19665f54556d'/>
<id>8e823bcbe6543acac17cff790f6f19665f54556d</id>
<content type='text'>
Fix issue where a signed integer is returned.

Example:

var b = new Buffer(4);
b.writeUInt32BE(0xffffffff);
b.readUInt32BE(0) == -1

Signed-off-by: Trevor Norris &lt;trev.norris@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix issue where a signed integer is returned.

Example:

var b = new Buffer(4);
b.writeUInt32BE(0xffffffff);
b.readUInt32BE(0) == -1

Signed-off-by: Trevor Norris &lt;trev.norris@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>buffer: truncate buffer after string decode</title>
<updated>2014-04-10T21:20:43+00:00</updated>
<author>
<name>Fedor Indutny</name>
<email>fedor.indutny@gmail.com</email>
</author>
<published>2014-03-27T17:45:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=4c36f3e7e6108660fc3629d76036e40c1938f639'/>
<id>4c36f3e7e6108660fc3629d76036e40c1938f639</id>
<content type='text'>
When our estimates for a storage size are higher than the actual length
of decoded data, the destination buffer should be truncated. Otherwise
`Buffer::Length` will give misleading information to C++ layer.

fix #7365

Signed-off-by: Fedor Indutny &lt;fedor@indutny.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When our estimates for a storage size are higher than the actual length
of decoded data, the destination buffer should be truncated. Otherwise
`Buffer::Length` will give misleading information to C++ layer.

fix #7365

Signed-off-by: Fedor Indutny &lt;fedor@indutny.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>buffer: improve {read,write}{U}Int* methods</title>
<updated>2014-04-02T00:31:28+00:00</updated>
<author>
<name>Nick Apperson</name>
<email>apperson@gmail.com</email>
</author>
<published>2014-03-25T14:51:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=d4fcb23e38e74d21e04b3a17d10e52949b630ec0'/>
<id>d4fcb23e38e74d21e04b3a17d10e52949b630ec0</id>
<content type='text'>
Increase the performance and simplify the logic of Buffer#write{U}Int*
and Buffer#read{U}Int* methods by placing the byte manipulation code
directly inline.

Also improve the speed of buffer-write benchmarks by creating a new
call directly to each method by using Function() instead of calling by
buff[fn].

Signed-off-by: Trevor Norris &lt;trev.norris@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Increase the performance and simplify the logic of Buffer#write{U}Int*
and Buffer#read{U}Int* methods by placing the byte manipulation code
directly inline.

Also improve the speed of buffer-write benchmarks by creating a new
call directly to each method by using Function() instead of calling by
buff[fn].

Signed-off-by: Trevor Norris &lt;trev.norris@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>buffer: fix typo in `SlowBuffer`</title>
<updated>2014-03-10T20:23:56+00:00</updated>
<author>
<name>Vladimir Kurchatkin</name>
<email>vladimir.kurchatkin@gmail.com</email>
</author>
<published>2014-03-08T14:52:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=e108ff4da7cd18d3b48cc6e769ae04c9578f7a8b'/>
<id>e108ff4da7cd18d3b48cc6e769ae04c9578f7a8b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>buffer: allow toString to accept Infinity for end</title>
<updated>2014-03-10T20:20:28+00:00</updated>
<author>
<name>Brian White</name>
<email>mscdex@mscdex.net</email>
</author>
<published>2014-03-09T20:46:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=68bfa91af702377bc4d0b36fc8ea25bcd16877a5'/>
<id>68bfa91af702377bc4d0b36fc8ea25bcd16877a5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>buffer: optimize writeInt* methods</title>
<updated>2013-12-20T21:01:17+00:00</updated>
<author>
<name>Paul Loyd</name>
<email>pavelko95@gmail.com</email>
</author>
<published>2013-12-12T21:16:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=2ca69051608f3cdbfa28e65de9ddd326a13cd000'/>
<id>2ca69051608f3cdbfa28e65de9ddd326a13cd000</id>
<content type='text'>
Remove unnecessary encoding within writeInt*
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove unnecessary encoding within writeInt*
</pre>
</div>
</content>
</entry>
<entry>
<title>buffer: convert values to uint, not int</title>
<updated>2013-11-15T19:48:09+00:00</updated>
<author>
<name>Trevor Norris</name>
<email>trev.norris@gmail.com</email>
</author>
<published>2013-11-14T23:40:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=d6df1b91579e95283768935ec3f43eb34e2dc818'/>
<id>d6df1b91579e95283768935ec3f43eb34e2dc818</id>
<content type='text'>
In many cases values expected to be unsigned were converted to a signed
integer.

Also include some small code cleanup.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In many cases values expected to be unsigned were converted to a signed
integer.

Also include some small code cleanup.
</pre>
</div>
</content>
</entry>
<entry>
<title>src: make buffer size errors more explicit</title>
<updated>2013-11-15T19:48:08+00:00</updated>
<author>
<name>Trevor Norris</name>
<email>trev.norris@gmail.com</email>
</author>
<published>2013-11-14T01:19:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=e5346932bcbc523489c9418b82fde31cb666ee99'/>
<id>e5346932bcbc523489c9418b82fde31cb666ee99</id>
<content type='text'>
Fixes #6490
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #6490
</pre>
</div>
</content>
</entry>
<entry>
<title>buffer: no warning when encoding isn't passed</title>
<updated>2013-11-15T19:48:03+00:00</updated>
<author>
<name>Trevor Norris</name>
<email>trev.norris@gmail.com</email>
</author>
<published>2013-11-14T00:27:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=a263abaa812010710958f89a493e0e5c8b29575a'/>
<id>a263abaa812010710958f89a493e0e5c8b29575a</id>
<content type='text'>
Buffer#write() was showing the deprecation warning when only
buf.write('string') was passed. This is incorrect since the encoding is
always optional.

Argument order should follow:
  Buffer#write(string[, offset[, length]][, encoding])

(yeah, not confusing at all)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Buffer#write() was showing the deprecation warning when only
buf.write('string') was passed. This is incorrect since the encoding is
always optional.

Argument order should follow:
  Buffer#write(string[, offset[, length]][, encoding])

(yeah, not confusing at all)
</pre>
</div>
</content>
</entry>
<entry>
<title>buffer: optimize common encoding cases</title>
<updated>2013-09-10T02:39:21+00:00</updated>
<author>
<name>Trevor Norris</name>
<email>trev.norris@gmail.com</email>
</author>
<published>2013-09-10T02:39:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=59dac01e4eaebd01714b6640ae2cd656796147fb'/>
<id>59dac01e4eaebd01714b6640ae2cd656796147fb</id>
<content type='text'>
String#toLowerCase() is incredibly slow and was costing a 15-30%
performance hit for Buffers less than 1KB. Now instead it'll attempt to
find the correct encoding directly from the passed encoding, only then
afterwards it'll lowercase.

The optimization for not passing any encoding at all is still at the top
of the method.

At most this may add 10% performance hit for passing a mixed case
encoding.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
String#toLowerCase() is incredibly slow and was costing a 15-30%
performance hit for Buffers less than 1KB. Now instead it'll attempt to
find the correct encoding directly from the passed encoding, only then
afterwards it'll lowercase.

The optimization for not passing any encoding at all is still at the top
of the method.

At most this may add 10% performance hit for passing a mixed case
encoding.
</pre>
</div>
</content>
</entry>
</feed>
