Adam Rocska
c7c3ab44db
Ok, the repo is somewhat exploded at this point. BUT IT WORKS! Now I only gotta provide proper tests instead of the trashy ones, put together the reader & serializer, and represent this maxmind php fantasy crap with some nice Structs. And then the saga is over for now.
...
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-28 14:23:26 +02:00
Adam Rocska
d7387c8845
Able to decode sequential types
...
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-27 20:07:25 +02:00
Adam Rocska
7b40c52c9d
Found a bug. I was an unattentive prick & assumed some clean logic in the definition size resolution algorithm. I shouldn't have. Now it's cool.
...
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-27 15:26:33 +02:00
Adam Rocska
c645dd40c4
Created the intentional duplicate of interpretArray. Intenional duplicate, because I know nothing about this php and perl scripter mountebank fantasy data type.
...
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-27 09:44:54 +02:00
Adam Rocska
3bd97a83f1
Array interpretation in place, the logic seems to work. Gotta duplicate the data cache container, because there's no word in the spec, nor guarantee that its array-like structure related assumptions are correct.
...
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-27 08:58:55 +02:00
Adam Rocska
5bcd7ba700
This awful design seems to be able to tackle php scripter stupidity. The code sucks, but at least is testable and works so far. Now I just gotta reconstruct sequence types, and I finally can forget about this horror, and stop taking sedatives.
...
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-26 16:43:56 +02:00
Adam Rocska
8bbcfb3d3b
Data padding added. Necessary code to handle php retardnesss of having 32bit integers defined in 0, 1, 2, 3 bytes...
...
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-20 17:44:19 +02:00
Adam Rocska
13fdc79bf9
Attempting a different way of typeconversion in hope, that we can handle the php scripter style stupidifaction of 11bit integers, and God knows what other retarded concepts can arise.
...
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-19 14:51:32 +02:00
Adam Rocska
966928cfd2
Falling back to the original crap code that emerged from crap php scripters' logic. Too many edge cases and stupidities to bother with. Dumb design can't be made straight.
...
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-17 19:49:15 +02:00
Adam Rocska
4f3245561e
made code 1 line shorter, but can't make it cleaner. I'm super angry on crappy code.
...
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-16 18:44:10 +02:00
Adam Rocska
ddd782925d
DataType foundations re-implemented. Can guess from this convoluted unclear non-unequivocal php scripter's fantasy the type of the data.
...
I must say, that it's outrageously stupid, that with this control byte data type definition the scripters "designed" implicitly allows for two different ways of defining map types. One is [0b111X_XXXX] and the other is [0b000X_XXXX, 0b0000_0000], where both resolve to fantasy 7 with that fucking retarded logic, though are not equal.
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-16 18:24:06 +02:00
Adam Rocska
2969e82f3f
isExtendedType implemented for DataType enum value
...
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-16 16:44:12 +02:00
Adam Rocska
f02cb01293
Gotta redesign the whole decoder layer. Managed to sketch a way to tackle with these php scripter fantasies in the MaxMind DB spec on the whiteboard.
...
Signed-off-by: Adam Rocska <adam.rocska@adams.solutions>
2020-05-16 15:09:22 +02:00