You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After calling mmkv.putInt("int", 100) several times, I got a file named after mmkv id under the app's data folder. By inspecting the file content with xxd, I am a little bit confused about the layout of the file.
The first four bytes are value of m_actualSize ,and we have 6700 0000 0x67 = 103 bytes.
Then we have 0603 696e 7401 64
06 is the size of the map
03 696e 74 represents the length(03 bytes) and content of the key (696e 74, "int")
01 64 represents the length(01 bytes) and the content of the value (0x64 = 100)
Why do we need to write size of the map into the mmaped file anyway? It seems that the size is of no use when decoding.
After calling
mmkv.putInt("int", 100)
several times, I got a file named after mmkv id under the app's data folder. By inspecting the file content withxxd
, I am a little bit confused about the layout of the file.m_actualSize
,and we have6700 0000
0x67 = 103 bytes.0603 696e 7401 64
06
is the size of the map03 696e 74
represents the length(03
bytes) and content of the key (696e 74
,"int"
)01 64
represents the length(01
bytes) and the content of the value (0x64
= 100)Why do we need to write size of the map into the mmaped file anyway? It seems that the size is of no use when decoding.
MMKV/Android/MMKV/mmkv/src/main/cpp/MiniPBCoder.cpp
Lines 253 to 271 in 2a3920a
The text was updated successfully, but these errors were encountered: