mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-04-23 19:36:26 +02:00
4647310322
Based on Swiftgram 12.5 (Telegram iOS 12.5). All GLEGram features ported and organized in GLEGram/ folder. Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass, Font Replacement, Fake Profile, Chat Export, Plugin System, and more. See CHANGELOG_12.5.md for full details.
25 lines
624 B
Swift
25 lines
624 B
Swift
//
|
|
// DataUtil.swift
|
|
// SwifSoup
|
|
//
|
|
// Created by Nabil Chatbi on 02/10/16.
|
|
// Copyright © 2016 Nabil Chatbi.. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
/**
|
|
* Internal static utilities for handling data.
|
|
*
|
|
*/
|
|
class DataUtil {
|
|
|
|
static let charsetPattern = "(?i)\\bcharset=\\s*(?:\"|')?([^\\s,;\"']*)"
|
|
static let defaultCharset = "UTF-8" // used if not found in header or meta charset
|
|
static let bufferSize = 0x20000 // ~130K.
|
|
static let UNICODE_BOM = 0xFEFF
|
|
static let mimeBoundaryChars = "-_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
static let boundaryLength = 32
|
|
|
|
}
|