Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
18 lines
450 B
Plaintext
18 lines
450 B
Plaintext
'use strict';
|
|
|
|
// lib/types/utils.ts
|
|
new TextDecoder();
|
|
var getView = (input, offset) => new DataView(input.buffer, input.byteOffset + offset);
|
|
var readUInt32LE = (input, offset = 0) => getView(input, offset).getUint32(0, true);
|
|
|
|
// lib/types/dds.ts
|
|
var DDS = {
|
|
validate: (input) => readUInt32LE(input, 0) === 542327876,
|
|
calculate: (input) => ({
|
|
height: readUInt32LE(input, 12),
|
|
width: readUInt32LE(input, 16)
|
|
})
|
|
};
|
|
|
|
exports.DDS = DDS;
|