[Development] 回复: Why qrc's metadatas is the big endian?

弓 长 zccrs at live.com
Tue May 24 11:28:56 CEST 2022

Do should provide a document for the compiled(via rcc) data format? if want to develop a tool about it, that need to know its binary format.

发件人: Thiago Macieira <thiago.macieira at intel.com>
发送时间: 2022年5月24日 3:33
收件人: development at qt-project.org <development at qt-project.org>
抄送: 弓 长 <zccrs at live.com>
主题: Re: [Development] Why qrc's metadatas is the big endian?

On Monday, 23 May 2022 19:51:15 PDT 弓 长 wrote:
> Hi, I don't find one document of reason about the design, I found this
> patch: https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodereview.qt-project.org%2Fc%2Fqt%2Fqtbase%2F%2B%2F177353&data=05%7C01%7C%7C99fafa986e2040cdd0a808da3d363548%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637889600293121473%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qkX1AscTu0QtDN6IDeLUZB3dEgjDPHRpcdvPNxhgF6w%3D&reserved=0 , apparently
> it was big endian before that.
> The reality is that little endian is more
> commonly used in local environments, so I wonder why we don't default to
> little endian?

Backwards compatibility. If you have a time machine and can send us a message
in the mid-1990s, we could make a change.

It's possible to change some of those fields by bumping the version number,
but it would add code, not reduce. That is, it would make things more complex,
not less. I don't think it's worth it. Byte-swapping is pretty fast.

Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20220524/c68289fd/attachment-0001.htm>

More information about the Development mailing list