rogersce / cnpy

library to read/write .npy and .npz files in C/C++
MIT License
1.31k stars 300 forks source link

Why forcing little endian? #81

Open ziyuang opened 2 years ago

ziyuang commented 2 years ago

At https://github.com/rogersce/cnpy/blob/master/cnpy.cpp#L94, I can see

loc1 = header.find("descr")+9;
bool littleEndian = (header[loc1] == '<' || header[loc1] == '|' ? true : false);
assert(littleEndian);

Why is there a constraint?