Quote:
Originally Posted by kyzcreig
So I actually don't want to decrypt anything, I believe what I would make would have general utility.
To put it more succinctly I want to use Amazon's location values to extract passages from text.
DRM is irrelevant here and of course removing it wouldn't solve my problems either.
|
The passages would be a bit hard to read if they were encrypted and you didn't decrypt them.
Plus, DRM was mentioned in the title of this thread.
Which is the reason I thought it would be relevant.
- - - -
Ah, which leaves only a question of the sort of measure that Amazon is using.
It might be bytes or characters.
For the starting location, either would be possible.
For the length, either would be possible.
("possible" because nothing is going to translate or convert the text encoding between making the notation and looking it up.)
My own first guess would be starting location in bytes and length in characters (remember, Kindles handle multi-byte character sets).
I don't know but a bit of experimenting (on a non-DRM protected document) should tell you what types of measurement units are being used.
- - - -
If the same code was to be used for both DRM and non-DRM protected documents - -
then the values would be two part values:
Block number and Displacement (in either bytes or characters) into the Block.
So a bit (no pun intended) of research into the block size that Amazon uses would still be required.
It should be easy to find experimentally, at least for a non-DRM protected document.
- - - -
Two part position (and length) value systems are common in file systems.
I.E: first block number:depth in bytes of start
similar for length and/or ending position.