exiv2 icon indicating copy to clipboard operation
exiv2 copied to clipboard

32/64 bit support in Exiv2

Open clanmills opened this issue 5 years ago • 1 comments

We announced in v0.27 (and the the five dots), that the API for v0.28 (now to be called v1.00) will change. There's a mix of size_t, uint32_t, long, int, uint64_t in the API. Now is the time to fix that.

I suspect the correct way forward is to use uint64_t everywhere.

We don't have to worry much about performance because Exiv2 is very fast. We can open and read the metadata from about 100+ files/second on my 6 year old MacMini.

There are two major interfaces "stripped out" and fixed. DataBuf and BasicIo. Then we examine all the code in the code using these interfaces. We also have an opportunity to modify these APIs and simply the code. For example, we could always "zero" the DataBuf in the constructor. We could throw in read() when there is insufficient data available.

The code in tvisitor for Io and DataBuf is similar to Exiv2. However, I made several very simple additions such as sub-files and class IoSave. The default for Io::seek() in the book is SEEK_CUR. Simple/trivial changes can make the code look much smoother.

clanmills avatar Apr 09 '21 11:04 clanmills

I guess in 2021 and beyond main focus should be on 64-bit CPU architectures.

PS: Just installed FreeBSD 13.0 AArch64 on RPi3B and testing GitLab Runner for CI/CD. So far so good.

1div0 avatar Apr 14 '21 07:04 1div0