- Joined
- Jul 10, 2007
- Messages
- 6,306
So, I've been working lately on an Encoder as many of you know.
I can encode this set of data in 7 chars (norm)
Giving me the minimal code of FP8S6T1 using base 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
After a check sum: 1NBD6HPOC
Scramble: 1HD27AFNB
Layered Checksum (using player hash): 27TBNALLY
Scramble: H9WKINW0
Checksum w/ Encoder Id: E0G0X14URYY
Scramble: 79ZY3NV0XDZ
So that 7 chars with just the basic code. 9 chars with basic and layered checksum (doesn't matter), but the encoder id is an additional 2 chars. Encoder id is just the struct instance that was used to generate the code (useful for backwards compatibility save/load codes, meaning if you add a few items to your map, you don't have to reset the super compact codes, you can just use an older encoder to read older codes).
So I was just wondering if anyone knew of a better way to put in the encoder or something. My current method is:
But that adds 2 chars ;|. That's 2 chars total for security and 2 chars total for how to decrypt, which to me is 2 too many (4 extra chars added on to the code). For all of the data encoded, this would actually be a cool save/load code: H9WK-INW0. Short and sweet ^_^.
So anyone have any ideas?
And the encryption algorithm I ran adds nothing to the code, so don't you worry over that ;p.
Am I just stuck using the encoder id, or does someone know a more elegant way of determining the version number of the code?
The code's lengths for any given version are variable, so those can't be used. The checksum can't even be retrieved without the encoder id as the checksum space allocated is different for each encoder >.>.
I'm stumped here. Without the encoder id, the map can never be updated as it would break all previous codes >.>.
How do other people store versions in their codes, like in TKoK? Or do they do it the same way, or a worse way, than my current way?
Tx ;D.
I can encode this set of data in 7 chars (norm)
Code:
Value: 1
Range: [-1000000,1000000]
Value: 500
Range: [500,1000]
Value: 100
Range: [0,100]
Value: 300
Range: [0,300]
Value: 1
Range: [0,1]
Value: 0
Range: [0,1]
Value: 7
Range: [0,16]
Value: 10
Range: [0,10]
Giving me the minimal code of FP8S6T1 using base 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
After a check sum: 1NBD6HPOC
Scramble: 1HD27AFNB
Layered Checksum (using player hash): 27TBNALLY
Scramble: H9WKINW0
Checksum w/ Encoder Id: E0G0X14URYY
Scramble: 79ZY3NV0XDZ
So that 7 chars with just the basic code. 9 chars with basic and layered checksum (doesn't matter), but the encoder id is an additional 2 chars. Encoder id is just the struct instance that was used to generate the code (useful for backwards compatibility save/load codes, meaning if you add a few items to your map, you don't have to reset the super compact codes, you can just use an older encoder to read older codes).
So I was just wondering if anyone knew of a better way to put in the encoder or something. My current method is:
JASS:
//make space for encoder id (1-8191)
//shifted (0-8190)
call bi.multiply(8191)
call bi.add(encoderId-1,0)
But that adds 2 chars ;|. That's 2 chars total for security and 2 chars total for how to decrypt, which to me is 2 too many (4 extra chars added on to the code). For all of the data encoded, this would actually be a cool save/load code: H9WK-INW0. Short and sweet ^_^.
So anyone have any ideas?
And the encryption algorithm I ran adds nothing to the code, so don't you worry over that ;p.
Am I just stuck using the encoder id, or does someone know a more elegant way of determining the version number of the code?
The code's lengths for any given version are variable, so those can't be used. The checksum can't even be retrieved without the encoder id as the checksum space allocated is different for each encoder >.>.
I'm stumped here. Without the encoder id, the map can never be updated as it would break all previous codes >.>.
How do other people store versions in their codes, like in TKoK? Or do they do it the same way, or a worse way, than my current way?
Tx ;D.