Skip to content

Commit fa30ab1

Browse files
committed
update readme
1 parent 7ca7908 commit fa30ab1

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,20 @@ print(db.languages())
7575
print(db.fields())
7676
print(db.build_time())
7777
print(db.find_map("117.136.83.55", "CN"))
78-
</pre>
78+
</pre>
79+
80+
### 支持加载压缩文件
81+
82+
除了直接加载 `ipdb` 格式文件外,还可以加载压缩文件
83+
84+
- 支持 `gzip`
85+
86+
<pre>
87+
import ipdb
88+
db = ipdb.BaseStation("/path/to/base_station.ipdb.gz", compression='gzip')
89+
print(db.is_ipv4(), db.is_ipv6())
90+
print(db.languages())
91+
print(db.fields())
92+
print(db.build_time())
93+
print(db.find_map("117.136.83.55", "CN"))
94+
</pre>

0 commit comments

Comments
 (0)