File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 3
3
purpose: "Lossless compressed data format compatible with GZIP utility"
4
4
name: 'codec-gzip
5
5
author: rights: "Oldes"
6
- version: 0.0.1
6
+ version: 0.0.2
7
7
specification: https://tools.ietf.org/html/rfc1952
8
8
]
9
9
@@ -13,7 +13,10 @@ register-codec [
13
13
title: "Lossless compressed data format compatible with GZIP utility."
14
14
suffixes: [%.gz ]
15
15
decode : function [ data [binary! ]] [
16
- if verbose > 0 [ identify data ]
16
+ if verbose > 0 [
17
+ print ["^[ [1;32mDecode GZIP data^[ [m (^[ [1m" length? data "^[ [mbytes )" ]
18
+ identify data
19
+ ]
17
20
decompress data 'gzip
18
21
]
19
22
@@ -23,9 +26,6 @@ register-codec [
23
26
24
27
identify : function [ data [binary! ]] [
25
28
if 10 > length? data [return none]
26
- if verbose > 0 [
27
- print ["^[ [1;32mDecode GZIP data^[ [m (^[ [1m" length? data "^[ [mbytes )" ]
28
- ]
29
29
bin: binary data
30
30
binary/read bin [
31
31
id: UI16 ; Magick: #{1F8B}
@@ -56,7 +56,7 @@ register-codec [
56
56
;checksum/part bin/buffer-write 'CRC32 index? bin/buffer
57
57
crc16: binary/read bin 'UI16LE
58
58
]
59
- if verbose > 0 [
59
+ if verbose > 1 [
60
60
print ["^[ [32mModified: ^[ [0;1m" mtime "^[ [m" ]
61
61
print ["^[ [32mExtra flags: ^[ [0;1m" xfl "^[ [m" ]
62
62
print ["^[ [32mOperating system: ^[ [0;1m" os "^[ [m" ]
You can’t perform that action at this time.
0 commit comments