Latest 0.6.3
Homepage https://github.com/FitnessKit/DataDecoder
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0, watchos 2.0
Authors

Swift Data Decoder. Easily Decode Data values

CI Status
Version
License
Platform

Installation

DataDecoder is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "DataDecoder"

How to Use

  let sensorData: Data = Data([ 0x02, 0xFE, 0xFF, 0xEF, 0xBE, 0xAD, 0xDE, 0xA5])

  var decoder = DataDecoder(sensorData)
  let height = decoder.decodeUInt8()
  let weight = decoder.decodeUInt16()
  let deadbeef = decoder.decodeUInt32()
  let nib = decoder.decodeNibble()
  let novalue = decoder.decodeNibble() //This should come back 0 as there is no more data  left

Data Decoders

  • Nibble
  • UInt8/Int8
  • UInt16/Int16
  • UInt24/Int23
  • UInt32/Int32
  • UInt48
  • UInt64/Int64
  • IEEE-11073 16-bit SFLOAT
  • IEEE-11073 32-bit FLOAT
  • IP Address to String Value
  • MAC Address to String Value

Author

Kevin A. Hoogheem, [email protected]

License

DataDecoder is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "DataDecoder",
    "version": "0.6.3",
    "summary": "Swift Data Decoder. Easily Decode Data values",
    "description": "Swift Data Decoder. Easily Decode Data values.",
    "homepage": "https://github.com/FitnessKit/DataDecoder",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kevin A. Hoogheem": "[email protected]"
    },
    "source": {
        "git": "https://github.com/FitnessKit/DataDecoder.git",
        "tag": "0.6.3"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "source_files": "Sources/**/*",
    "pushed_with_swift_version": "3.1"
}

Pin It on Pinterest

Share This