Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
case IntTypes.Int32:
componentSize = 4
break
case IntTypes.UInt32:
componentSize = 4
break
case IntTypes.Int64:
componentSize = 8
break
case IntTypes.UInt64:
componentSize = 8
break
case FloatTypes.Float32:
componentSize = 4
break
case FloatTypes.Float64:
componentSize = 8
break
default:
console.error('Unexpected component type: ' + image.imageType.componentType)
}
const numberOfBytes = pixelCount * image.imageType.components * componentSize
const pipelinePath = 'ZstdDecompress'
const args = ['input.bin', 'output.bin', String(numberOfBytes)]
const desiredOutputs = [
{ path: 'output.bin', type: IOTypes.Binary }
]
const inputs = [
{ path: 'input.bin', type: IOTypes.Binary, data: byteArray }
]
console.log(`input MB: ${byteArray.length / 1000 / 1000}`)
console.log(`output MB: ${numberOfBytes / 1000 / 1000 }`)