-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to unpack msgpack data in Windows for large strings #25
Comments
What platform do you use and specifically which CPU architecture? Can you check what the following macros give you:
|
@Lichtso output is:
|
Ok, that means none of these macros was defined by the compiler. Can you try to find a reliable way to detect the endianness of your machine? |
It seems it's little endian printf("ORDER IS LITTLE ENDIAN: %d\n", O32_HOST_ORDER == O32_LITTLE_ENDIAN);
printf("ORDER IS BIG ENDIAN: %d\n", O32_HOST_ORDER == O32_BIG_ENDIAN); it prints:
Should I include some other header file first? |
Ok, I think I understand now. Your intel machine is little endian but all endianness macros are undefined. Thus Try replacing the line 24 in src/MsgPack.cpp with this: |
This works! @Lichtso |
I just committed a fix for this, thank you! |
The foo.gz file is generated by the following python script:
When deserializing in windows using the following code, it failed to parse all strings.
the output is:
foo.gz
The text was updated successfully, but these errors were encountered: