1 | get("#179") -- base64
|
2 | |
3 | function uncompress(s) |
4 | s = decode64(s) |
5 | local pixels = {}
|
6 | for i=1, #s do |
7 | local b = s:byte(i) |
8 | --print(b) |
9 | for j=0, 7 do |
10 | if b >= 128 then |
11 | pixels[i*8-7+j] = -1 |
12 | b = b-128 |
13 | end |
14 | b = b*2 |
15 | end |
16 | end |
17 | return pixels |
18 | end |
Used 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: | 1209 / 14041 |
| Referenced in: | [show references] |