New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kenjiuno/msgreader

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kenjiuno/msgreader - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

a.json

84

lib/Burner.js

@@ -42,2 +42,12 @@ "use strict";

function repeatValue(value, count) {
var array = [];
for (var x = 0; x < count; x++) {
array.push(value);
}
return array;
}
var LiteFat = /*#__PURE__*/function () {

@@ -65,2 +75,13 @@ function LiteFat(source) {

}, {
key: "allocateAs",
value: function allocateAs(count, value) {
var first = this.sectors.length;
for (var x = 0; x < count; x++) {
this.sectors.push(value);
}
return first;
}
}, {
key: "finalize",

@@ -98,3 +119,3 @@ value: function finalize(boundary) {

this.fat = new LiteFat([-3]);
this.fat = new LiteFat([]);
this.miniFat = new LiteFat([]);

@@ -151,12 +172,18 @@ this.liteEnts = entries.map(function (it) {

this.liteEnts[0].firstSector = firstMiniDataSector;
var firstFatSector = this.fat.allocateAs(RoundUpto512(4 * this.fat.count()) / 512, -3);
var numFatSectors = this.fat.count() - firstFatSector;
var numDifatSectors = numFatSectors > 109 ? RoundUpto512(4 * (numFatSectors - 109)) / 512 : 0;
var firstDifatSector = numDifatSectors !== 0 ? this.fat.allocateAs(numDifatSectors, -4) : -2;
var array = new ArrayBuffer(512 * (1 + this.fat.count()));
var ds = new _DataStream["default"](array, 0, _DataStream["default"].LITTLE_ENDIAN);
ds.dynamicSize = false;
this.miniFat.finalize(512 / 4);
var difat1 = [];
var difat2 = [];
{
for (var x = 0; x < numFatSectors; x++) {
(x < 109 ? difat1 : difat2).push(firstFatSector + x);
}
} // header
if (this.fat.finalize(512 / 4).count() > 128) {
throw new Error("FAT overflowed!");
}
this.miniFat.finalize(512 / 4); // header
{

@@ -177,3 +204,3 @@ ds.seek(0);

ds.seek(0x2C);
ds.writeInt32(1); //int32 NumberOfFATSectors
ds.writeInt32(numFatSectors); //int32 NumberOfFATSectors

@@ -189,18 +216,20 @@ ds.writeInt32(entriesFirstSector); //int32 FirstDirectorySectorLocation

ds.writeInt32(-2); //int32 FirstDIFATSectorLocation
ds.writeInt32(firstDifatSector); //int32 FirstDIFATSectorLocation
ds.seek(0x4C);
ds.writeInt32(0); //int32 DIFAT[0]
ds.writeInt32(numDifatSectors); //int32 NumberOfDIFATSectors
for (var x = 1; x < 109; x++) {
var _x = 0;
for (; _x < difat1.length; _x++) {
ds.writeInt32(difat1[_x]); //int32 DIFAT[x]
}
for (; _x < 109; _x++) {
ds.writeInt32(-1); //int32 DIFAT[x]
}
} // fat
} // entries
ds.seek(512 * 1);
ds.writeInt32Array(this.fat.sectors); // entries
for (var _x = 0; _x < this.liteEnts.length; _x++) {
var liteEnt = this.liteEnts[_x];
var pos = 512 * (1 + entriesFirstSector) + 128 * _x;
for (var _x2 = 0; _x2 < this.liteEnts.length; _x2++) {
var liteEnt = this.liteEnts[_x2];
var pos = 512 * (1 + entriesFirstSector) + 128 * _x2;
ds.seek(pos);

@@ -212,3 +241,3 @@ ds.writeUCS2String(liteEnt.entry.name, null, null);

ds.writeUint8(liteEnt.entry.type);
ds.writeUint8(_x === 0 ? 0 : 1);
ds.writeUint8(_x2 === 0 ? 0 : 1);
ds.writeInt32(liteEnt.left);

@@ -218,3 +247,3 @@ ds.writeInt32(liteEnt.right);

if (_x === 0) {
if (_x2 === 0) {
ds.seek(pos + 0x50);

@@ -224,3 +253,3 @@ ds.writeUint8Array([0x0B, 0x0D, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46]);

var length = _x === 0 ? bytesMiniFat : liteEnt.entry.length;
var length = _x2 === 0 ? bytesMiniFat : liteEnt.entry.length;
ds.seek(pos + 0x74);

@@ -273,3 +302,12 @@ ds.writeInt32(liteEnt.firstSector);

ds.seek(512 * (1 + firstMiniFatSector));
ds.writeInt32Array(this.miniFat.sectors);
ds.writeInt32Array(this.miniFat.sectors); // fat
ds.seek(512 * (1 + firstFatSector));
ds.writeInt32Array(this.fat.sectors); // difat
if (numDifatSectors >= 1) {
ds.seek(512 * (1 + firstDifatSector));
ds.writeInt32Array(difat2);
}
this.array = array;

@@ -276,0 +314,0 @@ }

{
"name": "@kenjiuno/msgreader",
"version": "1.6.0",
"version": "1.6.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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