calculateOptimumDensity

  1. uinteger[ubyte] calculateOptimumDensity(uinteger streamLength, uinteger dataLength)
  2. uinteger[ubyte] calculateOptimumDensity(string filename, uinteger dataLength)
    uinteger[ubyte]
    calculateOptimumDensity
    (
    string filename
    ,
    uinteger dataLength
    )

Return Value

Type: uinteger[ubyte]

the optimum density (densities for a certain range), so all data can fit, while the highest quality is kept.

the return is assoc_array, where the index is the density, and the value at index is the length of bytes on which that density should be applied

only works properly if the dataLength with density 8 can at least fit into the streamLength

Meta