From fb45daaf67ddeaee047bb66ef2ae4f1ecbda1fcd Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Sun, 18 Dec 2016 16:23:37 +0300 Subject: [PATCH] Fixed typo in the name of the function. Added function to get bytes. --- SWCompression.xcodeproj/project.pbxproj | 2 +- Sources/CheckSums.swift | 2 +- Sources/DataWithPointer.swift | 12 +++++++++++- Sources/LZMA.swift | 4 ++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/SWCompression.xcodeproj/project.pbxproj b/SWCompression.xcodeproj/project.pbxproj index ff589f35..17addec1 100644 --- a/SWCompression.xcodeproj/project.pbxproj +++ b/SWCompression.xcodeproj/project.pbxproj @@ -289,10 +289,10 @@ isa = PBXGroup; children = ( 06A3931F1DE06FFE00182E12 /* Common */, - 069AC20C1E02DB1D0041AC13 /* LZMA.swift */, 06E2346B1E068E9600F18798 /* XZArchive.swift */, 063364E21DC52979007E313F /* GzipArchive.swift */, 064492581DC606D400F10981 /* ZlibArchive.swift */, + 069AC20C1E02DB1D0041AC13 /* LZMA.swift */, 061FCE251DBCC4BE0052F7BE /* Deflate.swift */, 06FED40B1DD7717E0013DFB2 /* BZip2.swift */, 06A3933D1DE070B500182E12 /* Service */, diff --git a/Sources/CheckSums.swift b/Sources/CheckSums.swift index 978c9eb4..8b366328 100644 --- a/Sources/CheckSums.swift +++ b/Sources/CheckSums.swift @@ -3,7 +3,7 @@ // SWCompression // // Created by Timofey Solomko on 18.12.16. -// Copyright © 2016 tsolomko. All rights reserved. +// Copyright © 2016 Timofey Solomko. All rights reserved. // import Foundation diff --git a/Sources/DataWithPointer.swift b/Sources/DataWithPointer.swift index 5aba9c57..e6ea812e 100644 --- a/Sources/DataWithPointer.swift +++ b/Sources/DataWithPointer.swift @@ -126,7 +126,17 @@ class DataWithPointer { return self.bitArray[self.index - 1] } - func intFromAlingedBytes(count: Int) -> Int { + func alignedBytes(count: Int) -> [UInt8] { + self.skipUntilNextByte() + var result: [UInt8] = Array(repeating: 0, count: count) + for i in 0.. Int { self.skipUntilNextByte() var result = 0 for i in 0..