code: private int[] makeAttribDeltas(AttributeData map, SortableVertex[] sortVertices) {
          // Attribute scaling factor
          float scale = 1.0f / map.precision;
  
          int[] prev = new int[4];
  
          int vc = sortVertices.length;
          int[] intAttribs = new int[vc * CTM_ATTR_ELEMENT_COUNT];
  
          for (int i = 0; i < vc; ++i) {
              // Get old attribute index (before vertex sorting)
              int oldIdx = sortVertices[i].originalIndex;
  
              // Convert to fixed point, and calculate delta and store it in the converted
              // array. NOTE: Here we rely on the fact that vertices are sorted, and
              // usually close to each other, which means that attributes should also
              // be close to each other (and we assume that they somehow vary slowly with
              // the geometry)...
  
              for (int j = 0; j < 4; ++j) {
                  int value = (int) floor(scale * map.values[oldIdx * 4 + j] + 0.5f);
                  intAttribs[i * 4 + j] = value - prev[j];
                  prev[j] = value;
              }
          }
          return intAttribs;
      }
docs: Calculate various forms of derivatives in order to reduce data entropy.
  
  @param map attributes
  @param sortVertices sorted vertices
  @return attributes of vertices