From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Godot optimized translation" |
|---|
| claim | "A bucket in bucket_table is i32 size, u32 func (hash seed), then size elements of four u32: key, str_offset, comp_size, uncomp_size; hash_table[h % size] holds the bucket index or 0xFFFFFFFF." |
|---|
| scope | | level | "library" |
|---|
| applies_to | "Godot OptimizedTranslation" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "OptimizedTranslation_Bucket" |
|---|
| size_min | "0x8" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "int32_t" |
|---|
| name | "size" |
|---|
|
| offset | "0x4" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "func" |
|---|
|
| offset | "0x8" |
|---|
| size | 16 |
|---|
| type | "struct{uint32_t key; uint32_t str_offset; uint32_t comp_size; uint32_t uncomp_size;}[size]" |
|---|
| name | "elem" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct Bucket / Elem and the comments; generate writes size, func then key, offset, compressed size, orig_len per element" |
|---|
| repo | "https://github.com/godotengine/godot" |
|---|
| commit | "81ab961f91066a63bcbf3ec340962bb1a1ada558" |
|---|
| path | "core/string/optimized_translation.h" |
|---|
| lines | "43-72" |
|---|
|
| type | "source" |
|---|
| detail | "generate: bucket_table writes in btw[btindex++] order" |
|---|
| repo | "https://github.com/godotengine/godot" |
|---|
| commit | "81ab961f91066a63bcbf3ec340962bb1a1ada558" |
|---|
| path | "core/string/optimized_translation.cpp" |
|---|
| lines | "165-184" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "OptimizedTranslation bucket" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T08:16:36.941Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:38:06.040Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read struct Bucket/Elem in optimized_translation.h and the generate loop in optimized_translation.cpp lines 163-184 at the cited commit: per bucket size, func, then size x (key, offset, compressed size, orig_len) written as u32; empty slots are 0xFFFFFFFF." |
|---|
| notes | "The value in hash_table is an index into bucket_table counted in 32-bit words (btindex), not in buckets." |
|---|
|
|
|---|