simple http protocol decode and encode library