 
 public extension DataScanner {
 
+    func scan(count: Int) throws -> UnsafeBufferPointer <Void>? {
+        if remainingSize < count {
+            return nil
+        }
+        let scannedBuffer = UnsafeBufferPointer <Void> (start: buffer.baseAddress.advancedBy(current), count: count)
+        current = current.advancedBy(count)
+        return scannedBuffer
+    }
+
+    func scan(count: Int) throws -> UnsafeBufferPointer <Void> {
+        guard let value:UnsafeBufferPointer <Void> = try scan(count) else {
+            throw Error.generic("Not enough data in buffer")
+        }
+        return value
+    }
+
+}
+
+public extension DataScanner {
+
     func scan(value: UInt8) throws -> Bool {
         if let scannedValue: UInt8 = try scan() {
             return scannedValue == value


    public var remaining: BufferType {
        return BufferType(start: buffer.baseAddress + current, count: buffer.count - current)
    }

    private var currentPointer: UnsafePointer <Void> {

        return string as String
    }

    func scanUpTo(byte: UInt8) throws -> UnsafeBufferPointer <UInt8>? {
        let start = current
        let buffer:UnsafeBufferPointer <UInt8> = self.buffer.toUnsafeBufferPointer()
