LHA Compressed .vol files by Krayvok - TribalWar Forums
Click Here to find great hosting deals from Branzone.com


Go Back   TribalWar Forums > Current Gaming > Tribes Talk
Reload this Page LHA Compressed .vol files
Thread Tools
Krayvok
VeteranXV
Old
1 - 04-03-2023, 00:22
Reply With Quote
For 1.11 .vol files that have LHA Compression. (Linux Only)

This will allow you to decompress, and export the .cs files.

Code:
import sys
import io
import os
import struct
f=open(sys.argv[1],'rb')
d=f.read(10000000)
dlen=len(d)
header=[0x22,] # header length
header.append(0x0) # checksum to be calculated later
header.extend(bytes(b"-lh1-"))
header.extend(bytes(struct.pack('<I',dlen)))
header.extend(bytes(struct.pack('<I',dlen)))
header.extend(bytes(struct.pack('<I',0x144c0800)))
header.extend([0x0,0x0])
header.append(0x0e)
header.extend(bytes(b'decomp'))
header.extend([0]*(0xe-6))
headdata=list(header)

databytes=bytes(d)
checksum=0x0
for b in databytes:
    checksum += b
checksum = checksum&0xFFFF
headchecksum=0x0
for b in (headdata[2:]):
    headchecksum = headchecksum+b
headchecksum = headchecksum & 0xFF
headdata[1] = headchecksum
for b in headdata:
    print(hex(b))
headdata.extend(d)
of=open(sys.argv[2],'wb')
of.write(bytes(headdata))
Code:
import os
import sys
import io
for arg in sys.argv[1:]:
    os.system('python3 cs_to_lha.py %s %s'%(arg,'decomp.lha'))
    os.system('rm decomp')
    os.system('lha x decomp.lha')
    os.system('cp decomp decompressed/%s'%(arg))
 
Krayvok is offline
 
Last edited by Krayvok; 04-03-2023 at 00:43..
Sponsored Links
Plasmatic
VeteranXX
Old
2 - 04-11-2023, 10:41
Reply With Quote
ok, thanks?
 
Plasmatic is online now
 
shadoh210
VeteranX
Old
3 - 05-01-2023, 01:42
Reply With Quote
Quote:
Originally Posted by Krayvok View Post
For 1.11 .vol files that have LHA Compression. (Linux Only)

This will allow you to decompress, and export the .cs files.

Code:
import sys
import io
import os
import struct
f=open(sys.argv[1],'rb')
d=f.read(10000000)
dlen=len(d)
header=[0x22,] # header length
header.append(0x0) # checksum to be calculated later
header.extend(bytes(b"-lh1-"))
header.extend(bytes(struct.pack('<I',dlen)))
header.extend(bytes(struct.pack('<I',dlen)))
header.extend(bytes(struct.pack('<I',0x144c0800)))
header.extend([0x0,0x0])
header.append(0x0e)
header.extend(bytes(b'decomp'))
header.extend([0]*(0xe-6))
headdata=list(header)

databytes=bytes(d)
checksum=0x0
for b in databytes:
    checksum += b
checksum = checksum&0xFFFF
headchecksum=0x0
for b in (headdata[2:]):
    headchecksum = headchecksum+b
headchecksum = headchecksum & 0xFF
headdata[1] = headchecksum
for b in headdata:
    print(hex(b))
headdata.extend(d)
of=open(sys.argv[2],'wb')
of.write(bytes(headdata))
Code:
import os
import sys
import io
for arg in sys.argv[1:]:
    os.system('python3 cs_to_lha.py %s %s'%(arg,'decomp.lha'))
    os.system('rm decomp')
    os.system('lha x decomp.lha')
    os.system('cp decomp decompressed/%s'%(arg))
is Lestat dead or what
 
shadoh210 is offline
 
lemon
Sour++
Old
4 - 05-15-2023, 18:06
Reply With Quote
no
 
lemon is offline
 


Go Back   TribalWar Forums > Current Gaming > Tribes Talk
Reload this Page LHA Compressed .vol files

Social Website Bullshit


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


AGENT: CCBot/2.0 (https://commoncrawl.org/faq/) / Y
All times are GMT -4. The time now is 15:53.