diff options
author | daurnimator <quae@daurnimator.com> | 2017-06-09 15:29:05 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-06-09 16:18:13 +1000 |
commit | d0715205776884eda6727273d8cd52bcc50a775a (patch) | |
tree | fb251e42ef6fd1f62150081bdbb7e92115ee91ed /src/lzio.js | |
parent | b01bf7ef940503e373d59c912c9952582a608a77 (diff) | |
download | fengari-d0715205776884eda6727273d8cd52bcc50a775a.tar.gz fengari-d0715205776884eda6727273d8cd52bcc50a775a.tar.bz2 fengari-d0715205776884eda6727273d8cd52bcc50a775a.zip |
src/lzio.js: Introduce luaZ_buffremove
Diffstat (limited to 'src/lzio.js')
-rw-r--r-- | src/lzio.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lzio.js b/src/lzio.js index 72969d4..9aa25bd 100644 --- a/src/lzio.js +++ b/src/lzio.js @@ -10,6 +10,10 @@ class MBuffer { } } +const luaZ_buffremove = function(buff, i) { + buff.n -= i; +}; + const luaZ_resetbuffer = function(buff) { buff.n = 0; buff.buffer = []; @@ -80,6 +84,7 @@ const luaZ_read = function(z, b, b_offset, n) { }; module.exports.EOZ = EOZ; +module.exports.luaZ_buffremove = luaZ_buffremove; module.exports.luaZ_fill = luaZ_fill; module.exports.luaZ_read = luaZ_read; module.exports.luaZ_resetbuffer = luaZ_resetbuffer; |