Latest 0.0.1
Homepage https://github.com/dduan/BitArray
License MIT
Platforms osx 10.10
Authors

A space-efficient bit array with RandomAccessCollection conformance in Swift.

Usage

Specify number of bits when creating an array:

var a = Array(3) // create an array of length 3
a[0] // false
a[1] = true
a[1] // true
let b = Array(a) // `b` has the same content as `a`.

Standard library protocols are honored:

let c: BitArray = [true, false, true]
let d = c.map { !$0 } // [false, true, false]
print(d) // "[false, true, false]"
c == d // false

See source code for more information.

Installation

Swift Package Manager

.package(url: "[email protected]:dduan/BitArray.git", .branch("master")),

(and "BitArray" to the target’s dependencies.)

CocoaPods

use_frameworks!

pod "BitArray"

Carthage

github "dduan/BitArray"

Xcode

Include BitArray.xcodeproj in your workspace the old-fashioned way.

Embedding

Include Sources/BitArray/BitArray.swift in your project.

LICENSE

[MIT][https://github.com/dduan/BitArray/blob/master/LICENSE.md].

Latest podspec

{
    "name": "BitArray",
    "version": "0.0.1",
    "license": {
        "type": "MIT"
    },
    "homepage": "https://github.com/dduan/BitArray",
    "authors": {
        "Daniel Duan": "[email protected]"
    },
    "summary": "A space-efficient bit array with `RandomAccessCollection` conformance in Swift.",
    "source": {
        "git": "https://github.com/dduan/BitArray.git",
        "tag": "0.0.1"
    },
    "source_files": "Sources/**/*.swift",
    "platforms": {
        "osx": "10.10"
    },
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This