Example #1
0
        private ArchiveFileInfo CreateAfi(Stream stream, int index, BlnSubEntry entry)
        {
            var compressionMagic = ReadInt32LittleEndian(stream);

            if (compressionMagic != 0xa755aafc)
            {
                return(new BlnSubArchiveFileInfo(stream, CreateFileName(index, stream, false), entry));
            }

            stream.Position = 0;
            return(new BlnSubArchiveFileInfo(stream, CreateFileName(index, stream, true), entry, Kompression.Implementations.Compressions.SpikeChunsoft, PeekDecompressedSize(stream)));
        }
Example #2
0
        private ArchiveFileInfo CreateAfi(Stream stream, int index, BlnSubEntry entry)
        {
            // Every file not compressed with the headered Spike Chunsoft compression, is compressed headerless
            var compressionMagic = PeekInt32LittleEndian(stream);

            if (compressionMagic != 0xa755aafc)
            {
                return(new BlnSubArchiveFileInfo(stream, CreateFileName(index, stream, false), entry, Kompression.Implementations.Compressions.SpikeChunsoftHeaderless, SpikeChunsoftHeaderlessDecoder.CalculateDecompressedSize(stream)));
            }

            stream.Position = 0;
            return(new BlnSubArchiveFileInfo(stream, CreateFileName(index, stream, true), entry, Kompression.Implementations.Compressions.SpikeChunsoft, PeekDecompressedSize(stream)));
        }
Example #3
0
 public BlnSubArchiveFileInfo(Stream fileData, string filePath, BlnSubEntry entry, IKompressionConfiguration configuration, long decompressedSize) :
     base(fileData, filePath, configuration, decompressedSize)
 {
     Entry        = entry;
     OriginalSize = fileData.Length;
 }
Example #4
0
 public BlnSubArchiveFileInfo(Stream fileData, string filePath, BlnSubEntry entry) :
     base(fileData, filePath)
 {
     Entry        = entry;
     OriginalSize = fileData.Length;
 }