All nodejs docs show that
is uninitialized
However,
haxe.io.Bytes.alloc(length);
returns an initialized (with 0's) buffer in all targets. While I can't seem to find any documentation to support this, the code in the standard haxe.io.Bytes suggests this to be the case
To maintain consistency, probably should do (at about line 266 in haxe/io/Bytes.hx) :
#elseif (nodejs || nodejs_std)
var a = new js.Node.NodeBuffer(length);
a.fill(0, 0, length);
return new Bytes(length,a);
instead of
#elseif (nodejs || nodejs_std)
return new Bytes(length,new js.Node.NodeBuffer(length));
All nodejs docs show that
is uninitialized
However,
returns an initialized (with 0's) buffer in all targets. While I can't seem to find any documentation to support this, the code in the standard haxe.io.Bytes suggests this to be the case
To maintain consistency, probably should do (at about line 266 in haxe/io/Bytes.hx) :
instead of