2020-10-14 05:38:20 +00:00
|
|
|
import fidget/opengl/perf, strformat, zippy
|
2020-10-14 04:09:43 +00:00
|
|
|
|
|
|
|
proc t() =
|
|
|
|
# let file = "alice29.txt.z"
|
|
|
|
let file = "urls.10K.z"
|
|
|
|
# let file = "test.z"
|
2020-10-14 05:57:34 +00:00
|
|
|
# let file = "randtest3.z"
|
2020-10-14 04:09:43 +00:00
|
|
|
let compressed = readFile(&"tests/data/{file}")
|
|
|
|
let uncompressed = uncompress(compressed)
|
2020-10-16 04:19:26 +00:00
|
|
|
# echo uncompressed.len
|
2020-10-14 04:09:43 +00:00
|
|
|
# echo cast[string](uncompressed)
|
|
|
|
# let compressed = compress(original, level=11)
|
|
|
|
# writeFile(&"tests/data/{file}.z", compressed)
|
|
|
|
|
|
|
|
timeIt "test":
|
2020-10-16 04:19:26 +00:00
|
|
|
for i in 0 ..< 100:
|
2020-10-14 04:09:43 +00:00
|
|
|
t()
|