RCTGzipData() acceps nil input, but was not marked as returning nullable output
Reviewed By: milend Differential Revision: D2854721 fb-gh-sync-id: 336b3261f1694bcc173f267582561c0314c0cea0
This commit is contained in:
parent
581434ac04
commit
cd2eed0d36
|
@ -97,7 +97,7 @@ RCT_EXTERN double RCTZeroIfNaN(double value);
|
|||
RCT_EXTERN NSURL *RCTDataURL(NSString *mimeType, NSData *data);
|
||||
|
||||
// Gzip functionality - compression level in range 0 - 1 (-1 for default)
|
||||
RCT_EXTERN NSData *RCTGzipData(NSData *__nullable data, float level);
|
||||
RCT_EXTERN NSData *__nullable RCTGzipData(NSData *__nullable data, float level);
|
||||
|
||||
// Returns the relative path within the main bundle for an absolute URL
|
||||
// (or nil, if the URL does not specify a path within the main bundle)
|
||||
|
|
|
@ -451,7 +451,7 @@ BOOL RCTIsGzippedData(NSData *__nullable data)
|
|||
return (data.length >= 2 && bytes[0] == 0x1f && bytes[1] == 0x8b);
|
||||
}
|
||||
|
||||
NSData *RCTGzipData(NSData *__nullable input, float level)
|
||||
NSData *__nullable RCTGzipData(NSData *__nullable input, float level)
|
||||
{
|
||||
if (input.length == 0 || RCTIsGzippedData(input)) {
|
||||
return input;
|
||||
|
|
Loading…
Reference in New Issue