Hi,
When considering disk write, it is a purely program-defined behavior because 
the underlying filesystem provides only interfaces that write bytes, so how you 
organize bytes on disk is your own business. Java serialization use bit 
operations to get each byte of integers and floats, so it does not concern the 
programmer how the hardware organize the bytes in memory, which can be referred 
to for your C implementation.

Best
Tian Jiang

发件人: Jamber Zhang
发送时间: 2021年9月27日 10:10
收件人: [email protected]
主题: Re: Endianess.

Hi,
Normally, in Java's default configuration,  ByteBuffer  is BigEndian.
Network protocol  often use BigEndian.
For C/C++, the endian depends on CPU type. X86 CPU use  LittleEndian.

Best
-----------------------
Jamber

Yuan Tian <[email protected]> 于2021年9月27日周一 上午9:50写道:

> Hi,
> I remember that the default endian in C++ seems to be LittleEndian.
>
> Best,
> -------------------
> Yuan Tian
>
> On Mon, Sep 27, 2021 at 2:26 AM Giorgio Zoppi <[email protected]>
> wrote:
>
> > Hello IoTDBers,
> > on disk, the java writes in BigEndian the buffer right?
> > I am looking at parquet, especially the implementation in C++, there are
> > similarities. Why did you choose your own?
> > BR,
> > Giorgio.
> >
>


Reply via email to