@@ -13,47 +13,11 @@ import Dispatch
1313#endif
1414
1515extension NSData {
16- public struct ReadingOptions : OptionSet {
17- public let rawValue : UInt
18- public init ( rawValue: UInt ) { self . rawValue = rawValue }
19-
20- public static let mappedIfSafe = ReadingOptions ( rawValue: UInt ( 1 << 0 ) )
21- public static let uncached = ReadingOptions ( rawValue: UInt ( 1 << 1 ) )
22- public static let alwaysMapped = ReadingOptions ( rawValue: UInt ( 1 << 2 ) )
23- }
24-
25- public struct WritingOptions : OptionSet {
26- public let rawValue : UInt
27- public init ( rawValue: UInt ) { self . rawValue = rawValue }
28-
29- public static let atomic = WritingOptions ( rawValue: UInt ( 1 << 0 ) )
30- public static let withoutOverwriting = WritingOptions ( rawValue: UInt ( 1 << 1 ) )
31- }
32-
33- public struct SearchOptions : OptionSet {
34- public let rawValue : UInt
35- public init ( rawValue: UInt ) { self . rawValue = rawValue }
36-
37- public static let backwards = SearchOptions ( rawValue: UInt ( 1 << 0 ) )
38- public static let anchored = SearchOptions ( rawValue: UInt ( 1 << 1 ) )
39- }
40-
41- public struct Base64EncodingOptions : OptionSet {
42- public let rawValue : UInt
43- public init ( rawValue: UInt ) { self . rawValue = rawValue }
44-
45- public static let lineLength64Characters = Base64EncodingOptions ( rawValue: UInt ( 1 << 0 ) )
46- public static let lineLength76Characters = Base64EncodingOptions ( rawValue: UInt ( 1 << 1 ) )
47- public static let endLineWithCarriageReturn = Base64EncodingOptions ( rawValue: UInt ( 1 << 4 ) )
48- public static let endLineWithLineFeed = Base64EncodingOptions ( rawValue: UInt ( 1 << 5 ) )
49- }
50-
51- public struct Base64DecodingOptions : OptionSet {
52- public let rawValue : UInt
53- public init ( rawValue: UInt ) { self . rawValue = rawValue }
54-
55- public static let ignoreUnknownCharacters = Base64DecodingOptions ( rawValue: UInt ( 1 << 0 ) )
56- }
16+ public typealias ReadingOptions = Data . ReadingOptions
17+ public typealias WritingOptions = Data . WritingOptions
18+ public typealias SearchOptions = Data . SearchOptions
19+ public typealias Base64EncodingOptions = Data . Base64EncodingOptions
20+ public typealias Base64DecodingOptions = Data . Base64DecodingOptions
5721}
5822
5923private final class _NSDataDeallocator {
0 commit comments