mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 18:31:53 +00:00
20 lines
327 B
Mathematica
20 lines
327 B
Mathematica
|
//
|
||
|
// NSData+CRC32.m
|
||
|
// Clock Signal
|
||
|
//
|
||
|
// Created by Thomas Harte on 22/07/2019.
|
||
|
// Copyright 2019 Thomas Harte. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import "NSData+CRC32.h"
|
||
|
|
||
|
#include <zlib.h>
|
||
|
|
||
|
@implementation NSData (StdVector)
|
||
|
|
||
|
- (NSNumber *)crc32 {
|
||
|
return @(crc32(crc32(0, Z_NULL, 0), self.bytes, (uInt)self.length));
|
||
|
}
|
||
|
|
||
|
@end
|