a2 / MessagePack.swift

It's like JSON, but fast and small…and Swift! – msgpack.org[Swift]
http://msgpack.org
MIT License
283 stars 60 forks source link

Workaround rdar://19779978, Length detection array16/32, joinString-Method #2

Closed ChristianSteffens closed 9 years ago

ChristianSteffens commented 9 years ago

Hi there,

I added some changes to my fork:

1. Adding a fix for parsing negative fixint (workaround for rdar://19779978), same as in branch swift-2.0 This is a fix for a known bug in Swift 1.2. There´s already a workaround in the Swift 2.0 branch, but for some reason it wasn't used for the master?

2. Simplified (and IMHO fixing the faulty one) length detection for array 16/32 The length detection for array 16 and 32 doesn't work for us and with the MessagePack Specification for arrays in mind, I guess this could be simplified as well: Array length is defined by either 2 or 4 bytes

3. Simplified joinString-Method and using UTF-32 encoding I simplified the joinString-Method and in our case the UTF-32 encoding was necessary. Although in this case I'm not sure this work´s for everyone.