-- Hw5 up!
Use the PHP pack, unpack, ord, chr as well as the operators &, | ~, etc to make sure you are manipulating bits not bytes. The Yioop file Utility.php has PHP code for some encoding and decoding operations related to some codes (not gamma codes though), so you can use it for inspiration. In particular, it does have code for encoding/decoding delta lists.
Use the PHP pack, unpack, ord, chr as well as the operators &, | ~, etc to make sure you are manipulating bits not bytes. The Yioop file Utility.php has PHP code for some encoding and decoding operations related to some codes (not gamma codes though), so you can use it for inspiration. In particular, it does have code for encoding/decoding delta lists.