<commit_before>import Foundation
import NIO

public struct Binary: Primitive {
    public enum SubType {
        case generic
        case function
        case uuid
        case md5
        case userDefined(UInt8)
        
        init(_ byte: UInt8) {
            switch byte {
            case 0x00: self = .generic
            case 0x01: self = .function
            case 0x04: self = .uuid
            case 0x05: self = .md5
            default: self = .userDefined(byte)
            }
        }
        
        var identifier: UInt8 {
            switch self {
            case .generic: return 0x00
            case .function: return 0x01
            case .uuid: return 0x04
            case .md5: return 0x05
            case .userDefined(let byte): return byte
            }
        }
    }
    
    /// A single byte indicating the data type
    public var subType: SubType
    
    /// The underlying data storage of the Binary instance
    public private(set) var storage: ByteBuffer
    
    /// The data stored
    public var data: Data {
        get {
            return storage.withUnsafeReadableBytes { bytes in
                return Data(bytes: bytes)
            }
        }
        set {
            storage = Document.allocator.buffer(capacity: newValue.count)
            storage.write(bytes: newValue)
        }<commit_msg>Fix compilation for Binary's Data getter<commit_after>import Foundation
import NIO

public struct Binary: Primitive {
    public enum SubType {
        case generic
        case function
        case uuid
        case md5
        case userDefined(UInt8)
        
        init(_ byte: UInt8) {
            switch byte {
            case 0x00: self = .generic
            case 0x01: self = .function
            case 0x04: self = .uuid
            case 0x05: self = .md5
            default: self = .userDefined(byte)
            }
        }
        
        var identifier: UInt8 {
            switch self {
            case .generic: return 0x00
            case .function: return 0x01
            case .uuid: return 0x04
            case .md5: return 0x05
            case .userDefined(let byte): return byte
            }
        }
    }
    
    /// A single byte indicating the data type
    public var subType: SubType
    
    /// The underlying data storage of the Binary instance
    public private(set) var storage: ByteBuffer
    
    /// The data stored
    public var data: Data {
        get {
            return storage.withUnsafeReadableBytes { buffer in
                let bytes = buffer.bindMemory(to: UInt8.self)
                
                return Data(buffer: bytes)
            }
        }
        set {
            storage = Document.allocator.buffer(capacity: newValue.count)
            storage.write(bytes: newValue)
        }
{'fraction_non_alphanumeric': 0.0638373751783167, 'fraction_numerical': 0.021754636233951498, 'mean_word_length': 1.3730964467005076, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5371928', 'n_tokens_mistral': 767, 'n_tokens_neox': 726, 'n_words': 241}