
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
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 460 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.