514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
|
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
|
-
+
-
+
-
+
-
+
|
{
return ((id <OFReadyForWritingObserving>)_stream)
.fileDescriptorForWriting;
}
- (void)close
{
unsigned long long remainder;
unsigned long long rest;
if (_stream == nil)
@throw [OFNotOpenException exceptionWithObject: self];
if (_toWrite > 0)
@throw [OFTruncatedDataException exception];
remainder = 512 - _entry.uncompressedSize % 512;
rest = 512 - _entry.uncompressedSize % 512;
if (remainder != 512) {
if (rest != 512) {
bool didBufferWrites = _stream.buffersWrites;
_stream.buffersWrites = true;
while (remainder--)
while (rest--)
[_stream writeInt8: 0];
[_stream flushWriteBuffer];
_stream.buffersWrites = didBufferWrites;
}
[_stream release];
|