get("#179") -- base64
function uncompress(s)
s = decode64(s)
local pixels = {}
for i=1, #s do
local b = s:byte(i)
--print(b)
for j=0, 7 do
if b >= 128 then
pixels[i*8-7+j] = -1
b = b-128
end
b = b*2
end
end
return pixels
endUsed for unpacking images compressed with #180
test run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Recognizer | Recognition Result | Visualize | Recalc |
|---|---|---|---|
| #308 | 302 | [visualize] |
| Snippet ID: | #181 |
| Snippet name: | b/w image decompressor |
| Eternal ID of this version: | #181/1 |
| Text MD5: | b08c79346cb50781e95b48432c5e8324 |
| Author: | stefan |
| Category: | |
| Type: | Lua code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2014-01-16 04:29:50 |
| Source code size: | 302 bytes / 18 lines |
| Pitched / IR pitched: | Yes / Yes |
| Views / Downloads: | 1208 / 14041 |
| Referenced in: | [show references] |