Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const dummy = (function () {
const data = fs.readFileSync(path.join(fixtures, 'trolltent.wmo'));
const stream = new r.DecodeStream(data);
return WMO.decode(stream);
}());
var stream = function stream() {
var data = fs.readFileSync(fixtures + 'Sample.dbc');
return new r.DecodeStream(data);
};
fontkit.create = function(buffer, postscriptName) {
for (let i = 0; i < formats.length; i++) {
let format = formats[i];
if (format.probe(buffer)) {
let font = new format(new r.DecodeStream(buffer));
if (postscriptName) {
return font.getFont(postscriptName);
}
return font;
}
}
throw new Error('Unknown font format');
};
const dummy = (function () {
const data = fs.readFileSync(path.join(fixtures, 'Rabbit00.skin'));
const stream = new r.DecodeStream(data);
return Skin.decode(stream);
}());
var dummy = (function () {
var data = fs.readFileSync(fixtures + 'Azeroth_38_46.adt');
var stream = new r.DecodeStream(data);
return ADT.decode(stream);
})();
get fonts() {
let fonts = [];
for (let offset of this.header.offsets) {
let stream = new r.DecodeStream(this.stream.buffer);
stream.pos = offset;
fonts.push(new TTFFont(stream));
}
return fonts;
}
}
const stream = function () {
const data = fs.readFileSync(path.join(fixtures, 'Sample.dbc'));
return new r.DecodeStream(data);
};
this.stream.pos = this._dataPos;
let buffer = this.stream.readBuffer(this.directory.totalCompressedSize);
let decompressedSize = 0;
for (let tag in this.directory.tables) {
let entry = this.directory.tables[tag];
entry.offset = decompressedSize;
decompressedSize += (entry.transformLength != null) ? entry.transformLength : entry.length;
}
let decompressed = brotli(buffer, decompressedSize);
if (!decompressed) {
throw new Error('Error decoding compressed data in WOFF2');
}
this.stream = new r.DecodeStream(new Buffer(decompressed));
this._decompressed = true;
}
}
const dummy = (function () {
const data = fs.readFileSync(path.join(fixtures, 'Rabbit.m2'));
const stream = new r.DecodeStream(data);
return M2.decode(stream);
}());
var dummy = (function () {
var data = fs.readFileSync(fixtures + 'Rabbit00.skin');
var stream = new r.DecodeStream(data);
return Skin.decode(stream);
})();