docs/bower_components/bootstrap/assets/js/jszip.js
function (file, compression) {
      var result = new JSZip.CompressedObject(), content;

      // the data has not been decompressed, we might reuse things !
      if (file._data instanceof JSZip.CompressedObject) {
         result.uncompressedSize = file._data.uncompressedSize;
         result.crc32 = file._data.crc32;

         if (result.uncompressedSize === 0 || file.options.dir) {
            compression = JSZip.compressions['STORE'];
            result.compressedContent = "";
            result.crc32 = 0;
         } else if (file._data.compressionMethod === compression.magic) {
            result.compressedContent = file._data.getCompressedContent();
         } else {
            content = file._data.getContent()
            // need to decompress / recompress
            result.compressedContent = compression.compress(JSZip.utils.transformTo(compression.compressInputType, content));
         }
      } else {
         // have uncompressed data
         content = getBinaryData(file);
         if (!content || content.length === 0 || file.options.dir) {
            compression = JSZip.compressions['STORE'];
            content = "";
         }
         result.uncompressedSize = content.length;
         result.crc32 = this.crc32(content);
         result.compressedContent = compression.compress(JSZip.utils.transformTo(compression.compressInputType, content));
      }

      result.compressedSize = result.compressedContent.length;
      result.compressionMethod = compression.magic;

      return result;
   }
function (file, compression) {
      var result = new JSZip.CompressedObject(), content;

      // the data has not been decompressed, we might reuse things !
      if (file._data instanceof JSZip.CompressedObject) {
         result.uncompressedSize = file._data.uncompressedSize;
         result.crc32 = file._data.crc32;

         if (result.uncompressedSize === 0 || file.options.dir) {
            compression = JSZip.compressions['STORE'];
            result.compressedContent = "";
            result.crc32 = 0;
         } else if (file._data.compressionMethod === compression.magic) {
            result.compressedContent = file._data.getCompressedContent();
         } else {
            content = file._data.getContent()
            // need to decompress / recompress
            result.compressedContent = compression.compress(JSZip.utils.transformTo(compression.compressInputType, content));
         }
      } else {
         // have uncompressed data
         content = getBinaryData(file);
         if (!content || content.length === 0 || file.options.dir) {
            compression = JSZip.compressions['STORE'];
            content = "";
         }
         result.uncompressedSize = content.length;
         result.crc32 = this.crc32(content);
         result.compressedContent = compression.compress(JSZip.utils.transformTo(compression.compressInputType, content));
      }

      result.compressedSize = result.compressedContent.length;
      result.compressionMethod = compression.magic;

      return result;
   }
function ( file , compression ) { var result = new JSZip . CompressedObject ( ) , content ; // the data has not been decompressed, we might reuse things ! if ( file . _data instanceof JSZip . CompressedObject ) { result . uncompressedSize = file . _data . uncompressedSize ; result . crc32 = file . _data . crc32 ; if ( result . uncompressedSize === 0 || file . options . dir ) { compression = JSZip . compressions [ 'STORE' ] ; result . compressedContent = "" ; result . crc32 = 0 ; } else if ( file . _data . compressionMethod === compression . magic ) { result . compressedContent = file . _data . getCompressedContent ( ) ; } else { content = file . _data . getContent ( ) // need to decompress / recompress result . compressedContent = compression . compress ( JSZip . utils . transformTo ( compression . compressInputType , content ) ) ; } } else { // have uncompressed data content = getBinaryData ( file ) ; if ( ! content || content . length === 0 || file . options . dir ) { compression = JSZip . compressions [ 'STORE' ] ; content = "" ; } result . uncompressedSize = content . length ; result . crc32 = this . crc32 ( content ) ; result . compressedContent = compression . compress ( JSZip . utils . transformTo ( compression . compressInputType , content ) ) ; } result . compressedSize = result . compressedContent . length ; result . compressionMethod = compression . magic ; return result ; }
Generate a JSZip.CompressedObject for a given zipOject.
@param {ZipObject} file the object to read.
@param {JSZip.compression} compression the compression to use.
@return {JSZip.CompressedObject} the compressed result.
Generate a JSZip . CompressedObject for a given zipOject .