gzip/deflatelua.lua

changeset 78
22977dbb746b
parent 65
41aeda62af16
equal deleted inserted replaced
77:d3ccd7ae7742 78:22977dbb746b
1 --[[
2 LICENSE
3
4 Copyright (C) 2008, David Manura.
5 Modifications (C) 2010, Matthew Wild <mwild1@gmail.com>
6
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 THE SOFTWARE.
24
25 (end license)
26 --]]
27
1 -- dmlib.deflate 28 -- dmlib.deflate
2 -- deflate (and gunzip) implemented in Lua. 29 -- deflate (and gunzip) implemented in Lua.
3 -- 30 --
4 -- Note: only supports decompression. 31 -- Note: only supports decompression.
5 -- Compression not implemented. 32 -- Compression not implemented.
445 deflate{input=bs, output=outbs} 472 deflate{input=bs, output=outbs}
446 473
447 bs:read(bs:nbits_left_in_byte()) 474 bs:read(bs:nbits_left_in_byte())
448 bs:read() 475 bs:read()
449 end 476 end
450
451
452 --[[
453 LICENSE
454
455 Copyright (C) 2008, David Manura.
456
457 Permission is hereby granted, free of charge, to any person obtaining a copy
458 of this software and associated documentation files (the "Software"), to deal
459 in the Software without restriction, including without limitation the rights
460 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
461 copies of the Software, and to permit persons to whom the Software is
462 furnished to do so, subject to the following conditions:
463
464 The above copyright notice and this permission notice shall be included in
465 all copies or substantial portions of the Software.
466
467 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
468 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
469 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
470 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
471 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
472 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
473 THE SOFTWARE.
474
475 (end license)
476 --]]

mercurial