Add reference tests for zig-zag encoding