I often see some documents which mention about compression and indexing such as bowtie, BGZF..
This is why I prepare this post. ah.. just link to reference.
Gzip compression algorithm
http://dalmasian.tistory.com/46
overall short introduction about compression algorithm
http://blog.naver.com/altools?Redirect=Log&logNo=150019572403
coding zip by using zlib
http://blog.naver.com/ksw7998?Redirect=Log&logNo=100011414029
Burrows-Wheeler Transform (bzip2)
http://james.fabpedigree.com/bwt.htm