Guest User

scompress

a guest
Aug 9th, 2014
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | None | 0 0
  1. local ipack = require "ipack"
  2.  
  3. local args = {...}
  4. local infile = args[1]
  5. local outfile = args[2]
  6. local f=io.open(infile,"rb")
  7. local a=f:read("*a")
  8. f:close()
  9. local f=io.open(outfile,"wb")
  10. for i = 1, a:len(), 256 do
  11.  s=ipack.compress(a:sub(i,i+256),8,0)
  12.  f:write(s:len()..s)
  13. end
  14. f:close()
Advertisement
Add Comment
Please, Sign In to add comment