[DiscordArchive] half implemented?
[DiscordArchive] half implemented?
Archived author: Skarn • Posted: 2018-10-22T20:33:41.919000+00:00
Original source
```py
MPQFileHeader = namedtuple('MPQFileHeader',
'''
magic
header_size
archive_size
format_version
sector_size_shift
hash_table_offset
block_table_offset
hash_table_entries
block_table_entries
'''
)
MPQFileHeader.struct_format = '<4s2I2H4I'
```
Archived author: Skarn • Posted: 2018-10-22T20:33:50.470000+00:00
Original source
okay I never knew you could do structs like this
Archived author: Adys • Posted: 2018-10-22T20:34:00.577000+00:00
Original source
like what?
Archived author: Adys • Posted: 2018-10-22T20:34:17.336000+00:00
Original source
oh you mean namedtuples?
Archived author: Adys • Posted: 2018-10-22T20:34:19.444000+00:00
Original source
i hate that
Archived author: Skarn • Posted: 2018-10-22T20:34:19.470000+00:00
Original source
well, I did not know named tuple has this struct_format attribute
Archived author: Skarn • Posted: 2018-10-22T20:34:27.474000+00:00
Original source
yeah looks bad
Archived author: Skarn • Posted: 2018-10-22T20:34:35.124000+00:00
Original source
worst part of python
Archived author: Skarn • Posted: 2018-10-22T20:34:37.348000+00:00
Original source
binary parsing
Archived author: Adys • Posted: 2018-10-22T20:34:52.273000+00:00
Original source
namedtuple doesnt have a struct_format attr