well-known-parser
Version:
A WKT/WKB/EWKT/EWKB/TWKB/GeoJSON parser and serializer
1 lines • 588 B
Source Map (JSON)
{"version":3,"file":"well-known-parser13.cjs","sources":["../src/zigzag.ts"],"sourcesContent":["/**\n * ZigZag encoding and decoding for efficient integer compression\n * Used in the TWKB format to compress coordinate values\n */\nexport function encode(value: number): number {\n return (value << 1) ^ (value >> 31);\n}\n\nexport function decode(value: number): number {\n return (value >> 1) ^ (-(value & 1));\n}"],"names":["encode","value","decode"],"mappings":"gFAIO,SAASA,EAAOC,EAAuB,CAC5C,OAAQA,GAAS,EAAMA,GAAS,EAClC,CAEO,SAASC,EAAOD,EAAuB,CAC5C,OAAQA,GAAS,EAAM,EAAEA,EAAQ,EACnC"}