some smart buffer work.

This commit is contained in:
brad Arant committed 2025-03-11 07:34:17 -07:00
1 parent f35fa12902
commit fd7a9ed860
14 files changed
+109 -142

No files matched your search

+7 -4
View File
@@ -1,15 +1,18 @@
#include "IMFHeader.h"
#include "Exception.h"
#include "Log.h"
#include <iostream>
#include <unistd.h>
namespace coreutils {
IMFHeader::IMFHeader(int fd) {
while(1) {
headers.emplace(fd);
char ch;
int rc = ::read(fd, &ch, 1);
while(ch != 'r') {
IMFHeaderField *headerField = new IMFHeaderField(ch, fd);
headers.add(headerField);
}
rc = ::read(fd, &ch, 1);
}
}