04-13-2010 09:53 AM
I am doing some general research into how the blackberry works, before embarking on some application development.
I am using JDE 4.7.0, and simulator 184.108.40.206 (9530), and have been looking at the file 9530-fs.dmp that gets created by the simulator. I have added some basic data phonebook information, some sms, etc and have noticed that long strings (over about 30 characters) are encoded, but I cant find any documentation that states what encoding is used. At first I just thought it was for SMS, but added a long name to a phonebook and that was encoded too. I presume that is an api function?
Can anyone help me out? I'm sure I'm just not looking hard enough, but there is a lot of data to wade through
Solved! Go to Solution.
04-13-2010 10:09 AM
The dmp files represent memory on the device and are not readily accessible, certainly you will not be able to look at it from a BlackBerry application on the device.
Can you explain why you think it is important for you to be able to extract from memory, what other applications have put in there? What data are you specifically looking. In general you will not be able to get it, but there might be specific bits of data we can help you find.
04-13-2010 10:16 AM - edited 04-13-2010 10:45 AM
I don't think its important, just curious
I was impressed with the compression achieved on some strings. For example, I entered the name
(thats 32 a's)
In the dmp file, its represented by 4 bytes!! (with some 00 padding and length indicators, its 8 bytes i think...)
Thats an impressive saving, considering unencoded that would be 32 bytes and 7 bit encoding would be 28 bytes
So I guess my question really is; what encoding / compression is used, and can I use it for anything I develop? Doesnt seem like standard gzip / zlib stuff to me (although I could be wrong )
04-15-2010 06:45 AM
It was using the standard blackberry phonebook. I created a contact with that as the street address.
Thats what I thought, whatever compression is used could be useful for me..
04-15-2010 10:19 AM
here is what the simulator stores it as
02 09 00 1C 1A A7 A0 00 00 00 02 09
I can tell 02 09 shows length (0x20 = 32 digits) and somehow the rest represents 32 a's! it stores it like this for pretty much any standard Blackberry application.
I tried doing 160 a's and it stores that in 5 bytes!!!!
I've done this as address 1 in a contact entry, an SMS message, and email message. I've also tried it on a pearl simulator and storm one, and I get the same result.
I'm thinking of making an messaging app, and compression for short strings is one thing I am going to have to consider. If this is standard on the blackberry, I would like to try and use it and see if it works for me.
All I can assume is there is some sort of lookup table to represent each character?
04-16-2010 05:21 AM
for the 9530, 9530-fs.dmp
the 8120, 8120-o2-fs.dmp
I know its suppose to be the encoding for my string because I have looked at other, non-encoded entries, and worked out where the string falls. In an sms, for example, you can see the phonenumber in ascii, and then shortly after you will have the message itself.
An unencoded string seems to be preceded by length byte, then 0x00 0x84 0xD0, then the string begins in ascii. An encoded string is preceded by a byte that doesnt appear to be the length (?), then 0x00 0x86 0xD0
Sorry for not explaining the length part, but if it is say 20 bytes long it will be 0x02 0x09, if its 28 bytes long it will be 0x02 0x89, if its 55 bytes long it'll be 0x05 0x59 (so its the 2nd digit from the first byte and the first digit of the second byte). I can see its not very clear from the single example i gave