 ///
 /// - parameter data: The input data to unpack.
 ///
-/// - returns: A `MessagePackValue`.
-public func unpack(_ data: Data, compatibility: Bool = false) throws -> (value: MessagePackValue, remainder: Subdata) {
-    return try unpack(Subdata(data: data), compatibility: compatibility)
+/// - returns: A `MessagePackValue` and the not-unpacked remaining data.
+public func unpack(_ data: Data, compatibility: Bool = false) throws -> (value: MessagePackValue, remainder: Data) {
+    let (value, remainder) = try unpack(Subdata(data: data), compatibility: compatibility)
+    return (value, remainder.data)
 }
 
 /// Unpacks a data object into a `MessagePackValue`, ignoring excess data.

///
/// - parameter data: The input data to unpack.
///
/// - returns: A `MessagePackValue`.
public func unpack(_ data: Subdata, compatibility: Bool = false) throws -> (value: MessagePackValue, remainder: Subdata) {
    guard !data.isEmpty else {
        throw MessagePackError.insufficientData

/// - parameter data: The input data to unpack.
/// - parameter length: The length of the data.
///
/// - returns: A subsection of data representing `size` bytes and the not-unpacked remaining data.
func unpackData(_ data: Subdata, count: Int) throws -> (value: Subdata, remainder: Subdata) {
    guard count > 0 else {
        throw MessagePackError.invalidArgument
