openfl
Version:
A fast, productive library for 2D cross-platform development.
99 lines (81 loc) • 2.27 kB
JavaScript
// Class: lime._internal.format.LZMA
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../../hxClasses_stub").default;
var $hxEnums = require("./../../../hxEnums_stub").default;
var $import = require("./../../../import_stub").default;
function haxe_io_Bytes() {return require("./../../../haxe/io/Bytes");}
// Constructor
var LZMA = function(){}
// Meta
LZMA.__name__ = "lime._internal.format.LZMA";
LZMA.__isInterface__ = false;
LZMA.prototype = {
};
LZMA.prototype.__class__ = LZMA.prototype.constructor = $hxClasses["lime._internal.format.LZMA"] = LZMA;
// Init
// Statics
LZMA.compress = function(bytes) {
var data = LZMA.compress;
var elements = null;
var array = null;
var view = null;
var buffer = bytes.getData();
var len = null;
var this1;
if(elements != null) {
this1 = new Uint8Array(elements);
} else if(array != null) {
this1 = new Uint8Array(array);
} else if(view != null) {
this1 = new Uint8Array(view);
} else if(buffer != null) {
if(len == null) {
this1 = new Uint8Array(buffer,0);
} else {
this1 = new Uint8Array(buffer,0,len);
}
} else {
this1 = null;
}
var data1 = data(this1,5);
if(typeof(data1) == "string") {
return (haxe_io_Bytes().default).ofString(data1);
} else {
return (haxe_io_Bytes().default).ofData(data1);
}
}
LZMA.decompress = function(bytes) {
var data = LZMA.decompress;
var elements = null;
var array = null;
var view = null;
var buffer = bytes.getData();
var len = null;
var this1;
if(elements != null) {
this1 = new Uint8Array(elements);
} else if(array != null) {
this1 = new Uint8Array(array);
} else if(view != null) {
this1 = new Uint8Array(view);
} else if(buffer != null) {
if(len == null) {
this1 = new Uint8Array(buffer,0);
} else {
this1 = new Uint8Array(buffer,0,len);
}
} else {
this1 = null;
}
var data1 = data(this1);
if(typeof(data1) == "string") {
return (haxe_io_Bytes().default).ofString(data1);
} else {
return (haxe_io_Bytes().default).ofData(data1);
}
}
// Export
exports.default = LZMA;