[DiscordArchive] i got another stupid question so when dbc contains strings they are located at end of file but what
[DiscordArchive] i got another stupid question so when dbc contains strings they are located at end of file but what
Archived author: Rymercyble • Posted: 2022-11-01T19:48:05.360000+00:00
Original source
i got another stupid question so when dbc contains strings they are located at end of file but what is located on their "original" position ?
Archived author: <o> • Posted: 2022-11-01T19:49:27.673000+00:00
Original source
an offset into the string block (file offset local to the beginning of the string block)
Archived author: Rymercyble • Posted: 2022-11-01T19:50:15.265000+00:00
Original source
i guess in bytes ?
Archived author: <o> • Posted: 2022-11-01T19:50:29.058000+00:00
Original source
correct
Archived author: Rymercyble • Posted: 2022-11-01T19:50:36.470000+00:00
Original source
from right ?
Archived author: <o> • Posted: 2022-11-01T19:50:43.909000+00:00
Original source
no, from the start of the string block
Archived author: <o> • Posted: 2022-11-01T19:51:04.450000+00:00
Original source
you can calculate the start of the string block via dbc headers record_count * record_size (plus size of header itself)
Archived author: <o> • Posted: 2022-11-01T19:51:24.159000+00:00
Original source
then you read a string until you find a 0 byte (this is called "null/zero termination")
Archived author: <o> • Posted: 2022-11-01T19:51:55.597000+00:00
Original source
first byte in the string block should always be a 0 byte for this reason, so that string fields with a 0 can easily point at an empty string
Archived author: Rymercyble • Posted: 2022-11-01T19:53:55.736000+00:00
Original source
aaaaand 17th value of loc is also 4 bytes ?