     }
 
     public static func unpack(_ bytes: [Byte]) throws -> Response {
+        
+        if bytes.count == 0 {
+            throw ResponseError.tooFewBytes
+        }
 
         let marker = Packer.Representations.typeFrom(representation: bytes[0])
         switch(marker) {

            pos += 2
            let size = Int(try UInt16.unpack(sizeBytes))

            if size == 0 {
                hasMoreChunks = false
            } else {

                let chunk = bytes[pos..<(pos+size)]
                pos += size
                chunks.append(Array(chunk))
            }
        }



        while pos < bytes.count {
            let (responseBytes, endPos) = try unchunk(bytes[pos..<bytes.count], fromPos: pos)
            if responseBytes.count == 0 {
                // Houston, we have a problem
            } else {
                responses.append(responseBytes)
            }
            pos = endPos
        }

