add initialization l_buf and d_buf
added the rest or deflate_* functions
code cleanup
changes after review