Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tiff

Package Overview
Dependencies
Maintainers
4
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiff - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

0

lib-esm/horizontalDifferencing.js

@@ -0,0 +0,0 @@ // Section 14: Differencing Predictor (p. 64)

7

lib-esm/ifd.js

@@ -10,9 +10,2 @@ import * as exif from './tags/exif';

export default class IFD {
kind;
data;
fields;
exif;
gps;
_hasMap;
_map;
constructor(kind) {

@@ -19,0 +12,0 @@ if (!kind) {

@@ -0,0 +0,0 @@ let types = new Map([

@@ -0,0 +0,0 @@ import TIFFDecoder from './tiffDecoder';

@@ -18,7 +18,2 @@ import { IOBuffer } from 'iobuffer';

class LzwDecoder {
stripArray;
currentBit;
tableLength;
currentBitLength;
outData;
constructor(data) {

@@ -25,0 +20,0 @@ this.stripArray = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);

@@ -0,0 +0,0 @@ const tagsById = {

@@ -0,0 +0,0 @@ const tagsById = {

@@ -0,0 +0,0 @@ const tagsById = {

@@ -13,3 +13,2 @@ import { IOBuffer } from 'iobuffer';

export default class TIFFDecoder extends IOBuffer {
_nextIFD;
constructor(data) {

@@ -16,0 +15,0 @@ super(data);

@@ -0,0 +0,0 @@ import Ifd from './ifd';

export {};
//# sourceMappingURL=types.js.map

@@ -0,0 +0,0 @@ import { inflate } from 'pako';

export declare function applyHorizontalDifferencing8Bit(data: Uint8Array, width: number, components: number): void;
export declare function applyHorizontalDifferencing16Bit(data: Uint16Array, width: number, components: number): void;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { IFDKind, DataArray } from './types';

@@ -31,9 +31,2 @@ "use strict";

class IFD {
kind;
data;
fields;
exif;
gps;
_hasMap;
_map;
constructor(kind) {

@@ -40,0 +33,0 @@ if (!kind) {

import TIFFDecoder from './tiffDecoder';
export declare function getByteLength(type: number, count: number): number;
export declare function readData(decoder: TIFFDecoder, type: number, count: number): any;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import TiffIfd from './tiffIfd';

@@ -0,0 +0,0 @@ "use strict";

export declare function decompressLzw(stripData: DataView): DataView;

@@ -21,7 +21,2 @@ "use strict";

class LzwDecoder {
stripArray;
currentBit;
tableLength;
currentBitLength;
outData;
constructor(data) {

@@ -28,0 +23,0 @@ this.stripArray = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);

declare const tagsById: Record<number, string>;
declare const tagsByName: Record<string, number>;
export { tagsById, tagsByName };

@@ -0,0 +0,0 @@ "use strict";

declare const tagsById: Record<number, string>;
declare const tagsByName: Record<string, number>;
export { tagsById, tagsByName };

@@ -0,0 +0,0 @@ "use strict";

declare const tagsById: Record<number, string>;
declare const tagsByName: Record<string, number>;
export { tagsById, tagsByName };

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { IOBuffer } from 'iobuffer';

13

lib/tiffDecoder.js

@@ -18,3 +18,2 @@ "use strict";

class TIFFDecoder extends iobuffer_1.IOBuffer {
_nextIFD;
constructor(data) {

@@ -116,7 +115,7 @@ super(data);

}
const valueByteLength = ifdValue_1.getByteLength(type, numValues);
const valueByteLength = (0, ifdValue_1.getByteLength)(type, numValues);
if (valueByteLength > 4) {
this.seek(this.readUint32());
}
const value = ifdValue_1.readData(this, type, numValues);
const value = (0, ifdValue_1.readData)(this, type, numValues);
ifd.fields.set(tag, value);

@@ -196,3 +195,3 @@ // Read sub-IFDs

// LZW compression
dataToFill = lzw_1.decompressLzw(stripData);
dataToFill = (0, lzw_1.decompressLzw)(stripData);
break;

@@ -202,3 +201,3 @@ }

// Zlib compression
dataToFill = zlib_1.decompressZlib(stripData);
dataToFill = (0, zlib_1.decompressZlib)(stripData);
break;

@@ -240,6 +239,6 @@ }

if (bitDepth === 8) {
horizontalDifferencing_1.applyHorizontalDifferencing8Bit(ifd.data, ifd.width, ifd.components);
(0, horizontalDifferencing_1.applyHorizontalDifferencing8Bit)(ifd.data, ifd.width, ifd.components);
}
else if (bitDepth === 16) {
horizontalDifferencing_1.applyHorizontalDifferencing16Bit(ifd.data, ifd.width, ifd.components);
(0, horizontalDifferencing_1.applyHorizontalDifferencing16Bit)(ifd.data, ifd.width, ifd.components);
}

@@ -246,0 +245,0 @@ else {

@@ -0,0 +0,0 @@ import Ifd from './ifd';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ /// <reference types="node" />

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map
export declare function decompressZlib(stripData: DataView): DataView;

@@ -7,3 +7,3 @@ "use strict";

const stripUint8 = new Uint8Array(stripData.buffer, stripData.byteOffset, stripData.byteLength);
const inflated = pako_1.inflate(stripUint8);
const inflated = (0, pako_1.inflate)(stripUint8);
return new DataView(inflated.buffer, inflated.byteOffset, inflated.byteLength);

@@ -10,0 +10,0 @@ }

{
"name": "tiff",
"version": "5.0.0",
"version": "5.0.1",
"description": "TIFF image decoder written entirely in JavaScript",

@@ -16,3 +16,3 @@ "main": "lib/index.js",

"clean": "rimraf lib lib-esm",
"eslint": "eslint src --ext ts",
"eslint": "eslint src",
"eslint-fix": "npm run eslint -- --fix",

@@ -22,5 +22,4 @@ "prepack": "npm run tsc",

"prettier-write": "prettier --write src",
"test": "npm run test-coverage && npm run eslint && npm run prettier && npm run check-types",
"test-coverage": "jest --coverage",
"test-only": "jest",
"test": "npm run test-only && npm run eslint && npm run prettier && npm run check-types",
"test-only": "jest --coverage",
"tsc": "npm run clean && npm run tsc-cjs && npm run tsc-esm",

@@ -45,16 +44,16 @@ "tsc-cjs": "tsc --project tsconfig.cjs.json",

"dependencies": {
"iobuffer": "^5.0.3",
"pako": "^2.0.3"
"iobuffer": "^5.0.4",
"pako": "^2.0.4"
},
"devDependencies": {
"@types/jest": "^26.0.23",
"@types/node": "^16.0.0",
"@types/pako": "^1.0.1",
"@types/jest": "^27.0.2",
"@types/node": "^16.10.3",
"@types/pako": "^1.0.2",
"eslint": "^7.30.0",
"eslint-config-cheminfo-typescript": "^8.0.9",
"jest": "^27.0.6",
"prettier": "^2.3.2",
"eslint-config-cheminfo-typescript": "^9.0.0",
"jest": "^27.2.5",
"prettier": "^2.4.1",
"rimraf": "^3.0.2",
"ts-jest": "^27.0.3",
"typescript": "^4.3.5"
"ts-jest": "^27.0.5",
"typescript": "^4.4.3"
},

@@ -61,0 +60,0 @@ "prettier": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc