
Research
Security News
Malicious npm Package Wipes Codebases with Remote Trigger
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Parses DDS texture headers in Node and the browser.
This was adapted from @toji's wonderful webgl-texture-utils.
Currently this only supports a limited range of common DDS formats:
See test/index.js for an example in Node, or demo/index.js for a WebGL compressed texture example.
Pull requests welcome.
var parse = require('parse-dds')
var buffer = new Uint8Array(... DDS file ...)
var dds = parse(buffer)
console.log(dds.format) // 'dxt1'
console.log(dds.shape) // [ width, height ]
console.log(dds.images) // [ ... mipmap level data ... ]
// get the compressed texture data for gl.compressedTexImage2D
var image = dds.images[0]
var texture = new Uint8Array(buffer, image.offset, image.length)
npm install parse-dds --save-dev
dds = parse(arrayBuffer)
Parses an ArrayBuffer and returns the DDS headers for that file.
The returned values:
shape
an array representing the [ width, height ]
of the textureflags
the DDS bit flags stored in the fileformat
a string, either 'dxt1'
, 'dxt3'
, 'dxt5'
or 'rgba32f'
images
a list of information to extract sub-arrays for each mipmap levelcubemap
a boolean indicating whether the file contains a cubemap imageEach image has the form:
{
shape: [ width, height ], // size of this mipmap level
offset: x, // byte offset into the input buffer
length: len, // length of this mipmap level image data
}
MIT, see LICENSE.md for details.
FAQs
parses the headers of a DDS texture file
The npm package parse-dds receives a total of 313 weekly downloads. As such, parse-dds popularity was classified as not popular.
We found that parse-dds demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.
Security News
New CNA status enables OpenJS Foundation to assign CVEs for security vulnerabilities in projects like ESLint, Fastify, Electron, and others, while leaving disclosure responsibility with individual maintainers.