diff --git a/SWCompression.podspec b/SWCompression.podspec index d88d479d..c1d0978d 100644 --- a/SWCompression.podspec +++ b/SWCompression.podspec @@ -44,12 +44,12 @@ Pod::Spec.new do |s| s.subspec 'BZip2' do |sp| sp.source_files = 'Sources/{BZip2,BZip2Error,Extensions,Protocols,CheckSums,DataWithPointer,BitReader,HuffmanTree,BitWriter}.swift' - sp.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS' => '-DSWCOMP_ZIP_POD_BZ2' } + sp.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS' => '-DSWCOMPRESSION_POD_BZ2' } end s.subspec 'LZMA' do |sp| sp.source_files = 'Sources/{LZMA*,Extensions,Protocols,DataWithPointer}.swift' - sp.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS' => '-DSWCOMP_ZIP_POD_LZMA' } + sp.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS' => '-DSWCOMPRESSION_POD_LZMA' } end s.subspec 'XZ' do |sp| @@ -60,7 +60,7 @@ Pod::Spec.new do |s| s.subspec 'ZIP' do |sp| sp.dependency 'SWCompression/Deflate' sp.source_files = 'Sources/{Zip*,CheckSums}.swift' - sp.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS' => '-DSWCOMP_ZIP_POD_BUILD' } + sp.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS' => '-DSWCOMPRESSION_POD_ZIP' } end s.subspec 'TAR' do |sp| diff --git a/Sources/ZipEntry.swift b/Sources/ZipEntry.swift index d267fe56..4f60b923 100644 --- a/Sources/ZipEntry.swift +++ b/Sources/ZipEntry.swift @@ -128,7 +128,7 @@ public class ZipEntry: ContainerEntry { bitReader.align() pointerData.index = bitReader.index case 12: - #if (!SWCOMP_ZIP_POD_BUILD) || (SWCOMP_ZIP_POD_BUILD && SWCOMP_ZIP_POD_BZ2) + #if (!SWCOMPRESSION_POD_ZIP) || (SWCOMPRESSION_POD_ZIP && SWCOMPRESSION_POD_BZ2) // BZip2 algorithm considers bits in a byte in a different order. let bitReader = BitReader(data: pointerData.data, bitOrder: .straight) bitReader.index = pointerData.index @@ -139,7 +139,7 @@ public class ZipEntry: ContainerEntry { throw ZipError.compressionNotSupported #endif case 14: - #if (!SWCOMP_ZIP_POD_BUILD) || (SWCOMP_ZIP_POD_BUILD && SWCOMP_ZIP_POD_LZMA) + #if (!SWCOMPRESSION_POD_ZIP) || (SWCOMPRESSION_POD_ZIP && SWCOMPRESSION_POD_LZMA) pointerData.index += 4 // Skipping LZMA SDK version and size of properties. let lzmaDecoder = try LZMADecoder(pointerData) try lzmaDecoder.decodeLZMA(uncompSize)