We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 197f83c commit bd60259Copy full SHA for bd60259
test.lua
@@ -1,8 +1,12 @@
1
require("bz2")
2
3
+-- read in a file and display the uncompressed data to stdout (i.e. this
4
+-- behaves identically to bzcat)
5
b = bz2.read_open("access_log.bz2")
-while 1 do
- text = bz2.read(b, 10)
6
+text = bz2.read(b, 1024)
7
+while text ~= nil do
8
+ io.write(text)
9
+ text = bz2.read(b, 1024)
10
if text == nil then
11
break
12
end
0 commit comments