[DiscordArchive] does string block offsets start with 1 or 0 ? i mean string ends with empty byte so string `Hangar`
[DiscordArchive] does string block offsets start with 1 or 0 ? i mean string ends with empty byte so string `Hangar`
Archived author: Rymercyble • Posted: 2022-11-08T18:36:07.423000+00:00
Original source
if string block is of size 1 and it contains empty byte there is nothing to talk about its either dbc without strings or with some empty strings
if there are strings then strings are ended with empty byte which is c string null terminated format and that is also used while reading it to find end of string by reaching empty byte of next string or if its end of string block reaching end of file
this is correct right ?
Archived author: stoneharry • Posted: 2022-11-08T18:37:24.841000+00:00
Original source
Yes, but the string block could be size 2 with position 1 being "A" then null byte, so the only string in the DBC is "A" and no empty strings
Archived author: Rymercyble • Posted: 2022-11-08T18:38:35.512000+00:00
Original source
sure that i understand....just to be sure by "then" u actually mean before bcs right to left right ?
Archived author: Titi • Posted: 2022-11-08T18:38:37.915000+00:00
Original source
Tldr there isn't only 1 right way to do it and even Blizz does it in different ways
Archived author: stoneharry • Posted: 2022-11-08T18:40:00.492000+00:00
Original source
"A\0" would be the contents of the string block
Archived author: stoneharry • Posted: 2022-11-08T18:40:06.849000+00:00
Original source
Not sure what you mean by right to left
Archived author: Rymercyble • Posted: 2022-11-08T18:40:42.379000+00:00
Original source
i still dont see how it could be done differently in terms of internal logic of that structure....yes i know there are dbcs which are optimized by multiple columns referencing to same offset and also dbcs where 1 string is 10 times in string block even though its same string but thats not different way of doing it
Archived author: Titi • Posted: 2022-11-08T18:41:01.300000+00:00
Original source
There is never anything right to left in dbcs except magic
Archived author: Rymercyble • Posted: 2022-11-08T18:52:04.569000+00:00
Original source
which of these is correct ?
`00000000 01000100 01101111 01100011 01101011 01110011`
`01000100 01101111 01100011 01101011 01110011 00000000`
Archived author: Titi • Posted: 2022-11-08T18:55:35.483000+00:00
Original source
Pretty sure the typical way is just hard coding to write a first 0 when writing the string block and then 2nd, write strings the null at the end
I think Blizz even writes some extra null bytes at the end of the stringblock too