bool is_compressed(std::string const &data); int decompress(std::string const &input, std::string &output); int compress(std::string const &input, std::string &output); int dezig(unsigned n); enum pb_geometry_type { pb_point = 1, pb_linestring = 2, pb_polygon = 3 }; enum pb_operation { pb_moveto = 1, pb_lineto = 2, pb_closepath = 7 }; enum pb_value_type { pb_string, pb_float, pb_double, pb_int, pb_uint, pb_sint, pb_bool }; struct pb_value { pb_value_type type; std::string string_value; union { float float_value; double double_value; long long int_value; unsigned long long uint_value; long long sint_value; bool bool_value; } numeric_value; }; struct pb_geometry { int /* pb_operation */ op; long long x; long long y; pb_geometry(int op, long long x, long long y) { this->op = op; this->x = x; this->y = y; } }; struct pb_feature { std::vector tags; int /* pb_geometry_type */ type; std::vector geometry; }; struct pb_layer { int version; std::string name; std::vector features; std::vector keys; std::vector values; int extent; }; struct pb_tile { std::vector layers; }; bool pb_decode(std::string &message, pb_tile &out);