Comments (7)
Using equality check over output of segments()
seems to work.
My second question remains.
from intelhex.
Due to internal data storage model there is no effective way for byte to byte comparison, that's actually O(n) operation.
from intelhex.
By "effective way", I meant something what does not have to repack data and do other unnecessary operations. Preferably in __eq__
. O(n) is fine and probably expected.
from intelhex.
Unfortunately, internally it has to repack data for comparing.
from intelhex.
I peeked into sources and IntelHex._buf
seems like dict of address->data.
Equality comparison then would be just comparison of those dicts when taking account few other option (offset,...).
Am I wrong?
from intelhex.
Yes, that's correct.
from intelhex.
Sorry, it seems I haven't thought enough about your question. So basically all you need is to compare this._buf to other._buf.
Yep, that should be easy addition. Patches welcome, and please provide some tests.
Also, there is hexdiff.py script to compare two Intel Hex files, you might look into using it. Actually, no, sorry.
from intelhex.
Related Issues (20)
- Can you add hex file support for TI C28x DSP? HOT 7
- TypeError while loading from TemporaryFile (Python 3) HOT 2
- hexdiff.py not working on Ubuntu 19.10 HOT 7
- The binary limitation of bin2hex is 4Kbytes. HOT 3
- Option to insert 'Extended Segment Address' record type instead of 'Extended Linear Address' HOT 6
- Starting Address record line is always the first line, but in original file it was last line HOT 11
- tostring bug when using Python 3.9 HOT 14
- Merge fails on two IntelHex16bit files... HOT 1
- A [0:0] slice will return the entire contents, when it should return a empty object HOT 1
- Array attribute HOT 2
- list(ih) causes the Python interpreter to hang up HOT 1
- Is it possible to get rid of those padding byte in list(ih)? HOT 8
- padding byte not retained in slices HOT 1
- intelhex hangs on using `in` operator HOT 2
- CS:IP entry point calculation seems to be incorrect HOT 2
- Swapping of bytes HOT 2
- bin2hex.py adds extra random byte HOT 2
- Search doesn't appear to work on the readthedocs site.
- Documentation for hex2bin function is not generated.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intelhex.