chromium/third_party/lzma_sdk/C/7zArcIn.c

/* 7zArcIn.c -- 7z Input functions
2021-02-09 : Igor Pavlov : Public domain */

#include "Precomp.h"

#include <string.h>

#include "7z.h"
#include "7zBuf.h"
#include "7zCrc.h"
#include "CpuArch.h"

#define MY_ALLOC(T, p, size, alloc)

#define MY_ALLOC_ZE(T, p, size, alloc)

#define MY_ALLOC_AND_CPY(to, size, from, alloc)

#define MY_ALLOC_ZE_AND_CPY(to, size, from, alloc)

#define k7zMajorVersion

enum EIdEnum
{};

const Byte k7zSignature[k7zSignatureSize] =;

#define SzBitUi32s_Init(p)

static SRes SzBitUi32s_Alloc(CSzBitUi32s *p, size_t num, ISzAllocPtr alloc)
{}

static void SzBitUi32s_Free(CSzBitUi32s *p, ISzAllocPtr alloc)
{}

#define SzBitUi64s_Init(p)

static void SzBitUi64s_Free(CSzBitUi64s *p, ISzAllocPtr alloc)
{}


static void SzAr_Init(CSzAr *p)
{}

static void SzAr_Free(CSzAr *p, ISzAllocPtr alloc)
{}


void SzArEx_Init(CSzArEx *p)
{}

void SzArEx_Free(CSzArEx *p, ISzAllocPtr alloc)
{}


static int TestSignatureCandidate(const Byte *testBytes)
{}

#define SzData_Clear(p)

#define SZ_READ_BYTE_SD(_sd_, dest)
#define SZ_READ_BYTE(dest)
#define SZ_READ_BYTE_2(dest)

#define SKIP_DATA(sd, size)
#define SKIP_DATA2(sd, size)

#define SZ_READ_32(dest)

static MY_NO_INLINE SRes ReadNumber(CSzData *sd, UInt64 *value)
{}


static MY_NO_INLINE SRes SzReadNumber32(CSzData *sd, UInt32 *value)
{}

#define ReadID(sd, value)

static SRes SkipData(CSzData *sd)
{}

static SRes WaitId(CSzData *sd, UInt32 id)
{}

static SRes RememberBitVector(CSzData *sd, UInt32 numItems, const Byte **v)
{}

static UInt32 CountDefinedBits(const Byte *bits, UInt32 numItems)
{}

static MY_NO_INLINE SRes ReadBitVector(CSzData *sd, UInt32 numItems, Byte **v, ISzAllocPtr alloc)
{}

static MY_NO_INLINE SRes ReadUi32s(CSzData *sd2, UInt32 numItems, CSzBitUi32s *crcs, ISzAllocPtr alloc)
{}

static SRes ReadBitUi32s(CSzData *sd, UInt32 numItems, CSzBitUi32s *crcs, ISzAllocPtr alloc)
{}

static SRes SkipBitUi32s(CSzData *sd, UInt32 numItems)
{}

static SRes ReadPackInfo(CSzAr *p, CSzData *sd, ISzAllocPtr alloc)
{}

/*
static SRes SzReadSwitch(CSzData *sd)
{
  Byte external;
  RINOK(SzReadByte(sd, &external));
  return (external == 0) ? SZ_OK: SZ_ERROR_UNSUPPORTED;
}
*/

#define k_NumCodersStreams_in_Folder_MAX

SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd)
{}


static MY_NO_INLINE SRes SkipNumbers(CSzData *sd2, UInt32 num)
{}


#define k_Scan_NumCoders_MAX
#define k_Scan_NumCodersStreams_in_Folder_MAX


static SRes ReadUnpackInfo(CSzAr *p,
    CSzData *sd2,
    UInt32 numFoldersMax,
    const CBuf *tempBufs, UInt32 numTempBufs,
    ISzAllocPtr alloc)
{}


UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex)
{}


CSubStreamInfo;


static SRes ReadSubStreamsInfo(CSzAr *p, CSzData *sd, CSubStreamInfo *ssi)
{}

static SRes SzReadStreamsInfo(CSzAr *p,
    CSzData *sd,
    UInt32 numFoldersMax, const CBuf *tempBufs, UInt32 numTempBufs,
    UInt64 *dataOffset,
    CSubStreamInfo *ssi,
    ISzAllocPtr alloc)
{}

static SRes SzReadAndDecodePackedStreams(
    ILookInStream *inStream,
    CSzData *sd,
    CBuf *tempBufs,
    UInt32 numFoldersMax,
    UInt64 baseOffset,
    CSzAr *p,
    ISzAllocPtr allocTemp)
{}

static SRes SzReadFileNames(const Byte *data, size_t size, UInt32 numFiles, size_t *offsets)
{}

static MY_NO_INLINE SRes ReadTime(CSzBitUi64s *p, UInt32 num,
    CSzData *sd2,
    const CBuf *tempBufs, UInt32 numTempBufs,
    ISzAllocPtr alloc)
{}


#define NUM_ADDITIONAL_STREAMS_MAX


static SRes SzReadHeader2(
    CSzArEx *p,   /* allocMain */
    CSzData *sd,
    ILookInStream *inStream,
    CBuf *tempBufs, UInt32 *numTempBufs,
    ISzAllocPtr allocMain,
    ISzAllocPtr allocTemp
    )
{}


static SRes SzReadHeader(
    CSzArEx *p,
    CSzData *sd,
    ILookInStream *inStream,
    ISzAllocPtr allocMain,
    ISzAllocPtr allocTemp)
{}

static SRes SzArEx_Open2(
    CSzArEx *p,
    ILookInStream *inStream,
    ISzAllocPtr allocMain,
    ISzAllocPtr allocTemp)
{}


SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream,
    ISzAllocPtr allocMain, ISzAllocPtr allocTemp)
{}


SRes SzArEx_Extract(
    const CSzArEx *p,
    ILookInStream *inStream,
    UInt32 fileIndex,
    UInt32 *blockIndex,
    Byte **tempBuf,
    size_t *outBufferSize,
    size_t *offset,
    size_t *outSizeProcessed,
    ISzAllocPtr allocMain,
    ISzAllocPtr allocTemp)
{}


size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest)
{}

/*
size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex)
{
  size_t len;
  if (!p->FileNameOffsets)
    return 1;
  len = 0;
  for (;;)
  {
    UInt32 parent = (UInt32)(Int32)-1;
    len += p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex];
    if SzBitWithVals_Check(&p->Parents, fileIndex)
      parent = p->Parents.Vals[fileIndex];
    if (parent == (UInt32)(Int32)-1)
      return len;
    fileIndex = parent;
  }
}

UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest)
{
  BoolInt needSlash;
  if (!p->FileNameOffsets)
  {
    *(--dest) = 0;
    return dest;
  }
  needSlash = False;
  for (;;)
  {
    UInt32 parent = (UInt32)(Int32)-1;
    size_t curLen = p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex];
    SzArEx_GetFileNameUtf16(p, fileIndex, dest - curLen);
    if (needSlash)
      *(dest - 1) = '/';
    needSlash = True;
    dest -= curLen;

    if SzBitWithVals_Check(&p->Parents, fileIndex)
      parent = p->Parents.Vals[fileIndex];
    if (parent == (UInt32)(Int32)-1)
      return dest;
    fileIndex = parent;
  }
}
*/