mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-25 04:14:13 +08:00
(Unity): compression method 2 is LZ4 as well.
This commit is contained in:
parent
9fb61e1e76
commit
051537348a
@ -87,6 +87,7 @@ namespace GameRes.Formats.Unity
|
|||||||
case 1:
|
case 1:
|
||||||
index_data = UnpackLzma (packed, index_size);
|
index_data = UnpackLzma (packed, index_size);
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
index_data = new byte[index_size];
|
index_data = new byte[index_size];
|
||||||
Lz4Compressor.DecompressBlock (packed, packed.Length, index_data, index_data.Length);
|
Lz4Compressor.DecompressBlock (packed, packed.Length, index_data, index_data.Length);
|
||||||
|
@ -118,7 +118,7 @@ namespace GameRes.Formats.Unity
|
|||||||
m_packed = new byte[segment.PackedSize];
|
m_packed = new byte[segment.PackedSize];
|
||||||
int packed_size = m_input.Read (m_packed, 0, (int)segment.PackedSize);
|
int packed_size = m_input.Read (m_packed, 0, (int)segment.PackedSize);
|
||||||
var output = PrepareBuffer (segment.UnpackedSize);
|
var output = PrepareBuffer (segment.UnpackedSize);
|
||||||
if (3 == method)
|
if (3 == method || 2 == method)
|
||||||
m_buffer_len = Lz4Compressor.DecompressBlock (m_packed, packed_size, output, (int)segment.UnpackedSize);
|
m_buffer_len = Lz4Compressor.DecompressBlock (m_packed, packed_size, output, (int)segment.UnpackedSize);
|
||||||
else
|
else
|
||||||
throw new NotImplementedException ("Not supported Unity asset bundle compression.");
|
throw new NotImplementedException ("Not supported Unity asset bundle compression.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user