Skip to content

Commit

Permalink
Update README.md with examples per BioJulia#12
Browse files Browse the repository at this point in the history
  • Loading branch information
samoconnor committed Jan 21, 2016
1 parent ba42de7 commit 3b3b1f3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,21 @@ close(io)

# pointlessly compress and decompress some data
readbytes(rand(UInt8, 10000) |> ZlibDeflateInputStream |> ZlibInflateInputStream)

# convenience functions
writegz("data.txt.gz", "Hello!")
string = readgzstring("data.txt.gz")

writegz("data.bin.gz", rand(UInt8, 10000))
bytes = readgz("data.bin.gz")

s = gzopen("data.bin.gz")
bytes = read(s)
close(s)

gzopen("data.bin.gz", "w") do s
write(s, rand(UInt8, 10000))
end
```

## Other functions
Expand Down

0 comments on commit 3b3b1f3

Please sign in to comment.