diff --git a/lib/bcoin/writer.js b/lib/bcoin/writer.js index 7437cd18..b880357a 100644 --- a/lib/bcoin/writer.js +++ b/lib/bcoin/writer.js @@ -72,6 +72,11 @@ BufferWriter.prototype.render = function render(keep) { case 'checksum': off += utils.checksum(data.slice(0, off)).copy(data, off); break; + // case 'seek': off += item[1]; break; + // case 'fill': + // item[1].fill(item[1], off, off + item[2]); + // off += item[2]; + // break; } } @@ -354,6 +359,21 @@ BufferWriter.prototype.fill = function fill(value, size) { this.data.push(['bytes', buf]); }; +// BufferWriter.prototype.fill = function fill(value, size) { +// assert(size >= 0); +// this.written += size; +// this.data.push(['fill', value, size]); +// }; + +/* + * Seek to relative offset. + * @param {Number} offset + */ + +// BufferWriter.prototype.seek = function seek(offset) { +// this.data.push(['seek', offset]); +// }; + /** * Write float le. * @param {Number} value