VirtualBox

source: vbox/trunk/src/libs/liblzma-5.4.1/simple/simple_encoder.c@ 102795

最後變更 在這個檔案從102795是 98730,由 vboxsync 提交於 2 年 前

libs/liblzma-5.4.1: Export to OSE, bugref:10254

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 983 位元組
 
1///////////////////////////////////////////////////////////////////////////////
2//
3/// \file simple_encoder.c
4/// \brief Properties encoder for simple filters
5//
6// Author: Lasse Collin
7//
8// This file has been put into the public domain.
9// You can do whatever you want with this file.
10//
11///////////////////////////////////////////////////////////////////////////////
12
13#include "simple_encoder.h"
14
15
16extern lzma_ret
17lzma_simple_props_size(uint32_t *size, const void *options)
18{
19 const lzma_options_bcj *const opt = options;
20 *size = (opt == NULL || opt->start_offset == 0) ? 0 : 4;
21 return LZMA_OK;
22}
23
24
25extern lzma_ret
26lzma_simple_props_encode(const void *options, uint8_t *out)
27{
28 const lzma_options_bcj *const opt = options;
29
30 // The default start offset is zero, so we don't need to store any
31 // options unless the start offset is non-zero.
32 if (opt == NULL || opt->start_offset == 0)
33 return LZMA_OK;
34
35 write32le(out, opt->start_offset);
36
37 return LZMA_OK;
38}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette