Okay, I get it, possible duplicate of [Read binary QR Code with AVFoundation](https://stackoverflow.com/questions/32429480/read-binary-qr-code-with-avfoundation) but I'll try to tackle this issue from a different angle.

I'm trying to scan a barcode (in this case, Aztec) in my `swift` app. It works for barcodes that have regular string data encoded. For my app though, I need to be able to scan a certain type of barcode ([read more about this on SO](https://stackoverflow.com/questions/34423303/need-help-decompressing-zlib-data-stored-in-aztec-barcode-deutsche-bahn-ticket)) that stores the data in binary format.
Sadly, `stringValue` of `AVMetadataMachineReadableCodeObject` is (per [Apple's docs](https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVMetadataMachineReadableCodeObject_Class/#//apple_ref/occ/instp/AVMetadataMachineReadableCodeObject/stringValue))

> 
> The value of this property is an NSString created by **decoding the
>  binary payload** according to the format of the machine-readable code
> 
> 
> 

so the output gets garbled, truncated and unusable (It's a `zlib`-encoded data stream).

My question is: is there a way to get to this **binary payload** other that `stringValue`? Can I override part of `AVMetadataMachineReadableCodeObject` and add my own `binaryValue` or something like it.

I'm willing to try anything, but I'd love this to work natively without resorting to `ZXing` or some other library, as this is a pretty compact project. If you know this to be working with a library, feel free to add a comment though.

*Disclaimer: I'm coding this in Swift, but I think I could manage to abstract this from Obj-C code as well, if that is what you know.*