+import Foundation
 
 let isBigEndian = Int(bigEndian: 42) == 42
 

        }
        return res
    }
}

        return res
    }

    public static func encodeMapToAny<A: CBOREncodable>(_ map: [A: Any]) throws -> [UInt8] {
        var res: [UInt8] = []
        res = map.count.encode()
        res[0] = res[0] | 0b101_00000
        try CBOR.encodeMap(map, into: &res)
        return res
    }

    // MARK: - major 6: tagged values

    public static func encodeTagged<T: CBOREncodable>(tag: Tag, value: T) -> [UInt8] {
