open-vector-tile - v1.8.0
    Preparing search index...

    Function encodeOffset

    • Encode offset values into a signed integer to reduce byte cost without too much loss

      Parameters

      • offset: number

        float or double value to be compressed

      Returns number

      • a signed integer that saves 3 decimal places