Refactored zig-zag encoding. Implemented serializing and parsing of packed numeric types.