Бинарный файл в изображение XCODE?

Доброго времени суток! Существует такая проблемка.

Веб-сервис передает закодированное изображение в бинарном(?) формате.

Вопрос следующий: каким образом можно реализовать процедуру декодирования этого шифра обратно в изображение в среде XCODE? )

пример шифра:
<imageName>Спартак.jpg</imageName>
               <imageSource>/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAZAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQICAgICAgICAgICAwMDAwMDAwMDAwEBAQEBAQECAQECAgIBAgIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMD/8AAEQgAZABkAwERAAIRAQMRAf/EAK0AAQABBAMBAQAAAAAAAAAAAAAKAQIICQMFBwYEAQEAAgIDAQEAAAAAAAAAAAAABwgGCQMEBQECEAAABgIBAgMEBwcBCQAAAAABAgMEBQYABwgREiETCTFRoRRh0SJSotIV8EFxkbEjFheBwTJCMyQ0RCYRAAIBAwIEBQEFBQcFAAAAAAECAwAEBREGITESB0FRIhMIFGEyUiMVsUJyYwlxgTNDJFQWkaFiU3P/2gAMAwEAAhEDEQA/AJ/GKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSqAID78UquKUxSmKUxSmKUxSrTB1KYPeUQ+GKVwFT93X+YgHwxSr/LH3/ER/rilV7B+j4/VilWiAh169OgB1Ef3AHTr4iPsz4aftrX9v31DdO6kj7CSovoPYklWllmFntK9qjqnpOgSSaQnFhe9vPknkKM6Q3h+gwSM3YzmKJAYlHxzBs3vzFYtJPpSk8kZIdy4S3iPlJOdV6v5UYklPLoq0fbH4qb+31c2r56O5xVneKHt7cW0lzlr5CdOuzxaFJvZP8AvbxrSwAPUbk6aVi9xj9XKjbYUfJWV1U9gRLJ26GTuGjYq4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HDGsUKqkSjQKoAAA5AAcAB4Cqa3l7eZG7kv7+WWe+mcvJJI7PI7MdWZ3YlmYniSxJJ4mv3gYofv+A5yV1ar3l9/wAB+rFKqAgPsxSq4pVBDqAh7wEPD6fDFK4/JKH/ADH/AJh9WKU8oPvH/mA/1DFKr5YfeN+H8uKU8sPvG/D+XFKeWAewxg8evUO38v78aU/ZXUQlbgKywCLrcLE16MBw5eBHQcYwiWHzb1c7l46+TYN27f5l25UMoqft7lDiJjCIj1zihghtk9u3RY49SdFAUaniToNBqTxPma72RymTzFz9Zl7ie6vOhV9yaR5H6UAVV63JbpVQFUa6AAAaCu38sPvG/D+XOWujTyw+8b8P5cUp5YfeN+H8uKU8sPvG/D+XFKuKXt6+Ij19/T/cAYpV2KUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSmKUxSv//Z</imageSource>
               <name>Спартак</name>



Заранее спасибо )
  • Вопрос задан
  • 3902 просмотра
Решения вопроса 1
WizAlx
@WizAlx Автор вопроса
Проблема решилась следующим образом )
Всем спасибо!)
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 3
hack2root
@hack2root
Погугли Base64 — Binary algotithm
Ответ написан
@SBJoker
Это 100% base64, удалось декодировать изображение в формате JPEG — эмблема спартака.
Ответ написан
Комментировать
corristo
@corristo
github.com/l4u/NSData-Base64

Если целевая версия iOS = 7, то там методы кодирования/декодирования base64 встроены.
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы