Socket
Socket
Sign inDemoInstall

jpeg-lossless-decoder-js

Package Overview
Dependencies
1
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jpeg-lossless-decoder-js

A JavaScript JPEG Lossless decoder.


Version published
Weekly downloads
1.3K
decreased by-24.6%
Maintainers
2
Install size
8.37 MB
Created
Weekly downloads
 

Readme

Source

JPEGLosslessDecoderJS

A common DICOM compression format is JPEG Lossless. This format is generally not supported in standard JPEG decoder libraries.

This decoder can read data from the following DICOM transfer syntaxes:

  • 1.2.840.10008.1.2.4.57 JPEG Lossless, Nonhierarchical (Processes 14)
  • 1.2.840.10008.1.2.4.70 JPEG Lossless, Nonhierarchical (Processes 14 [Selection 1])

Usage

API and more examples

var decoder = new jpeg.lossless.Decoder();
var output = decoder.decompress(buffer [, offset [, length]]);

// Parameters
// {ArrayBuffer} buffer
// {Number} offset offset into buffer (default = 0)
// {Number} length length of buffer (default = end of JPEG block)

// Returns
// {ArrayBuffer} output (size = cols * rows * bytesPerComponent * numComponents)

Install

Get a packaged source file from the release folder:

Or install via NPM:

npm install jpeg-lossless-decoder-js

Testing

npm test

Building

npm run build

This will output lossless.js and lossless-min.js alongside declaration files and source maps to /release.

Acknowledgments

This decoder was originally written by Helmut Dersch for Java. I added support for selection values 2 through 7, contributed bug fixes and ported to JavaScript.

Also thanks to @jens-ox for modernizing this package to TypeScript.

Keywords

FAQs

Last updated on 02 Apr 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc