webfile.txt

来自「mini http server,可以集成嵌入到程序中,实现简单的web功能」· 文本 代码 · 共 98 行

TXT
98
字号

Introduction
============
This document Describes the internal layout of the deadbeat
server-side javascript files.

Conventions
===========
Fixed length values are described thus:
	fixed[length: contents],	where length gives the length in
	bytes of the field and contents is an english description of the fields
	contents

Variable length records are described thus:
	variable[name: contents],	where name give a unique name for this 
	field and contents is an english description of the fields contents.
	The name for a field can be used to infer its attributes elsewhere
	in the text, so a group of fields may be described as:-
	
	fixed[20: foo.length in decimal ASCII]
	variable[foo: the data]

	This describes a fixed length field which represents the length
	of field foo which contains data. Thus the sum total of both
	fields will to 20+foo.length and the data starts a 20 bytes.

Records are described thus:
	record[name: contents]
	{
	field1;
	...
	...
	fieldN;
	}
	
	Name give the name of the record. Contents describes its contents in
	overview, and the fields within paranthesis (which may also be records)
	formally describe the contents.

Numeric values in ASCII form are padded with spaces unless otherwise
noted.

Web Record
==========
	Every compiled deadbeat file contains a single Web Record


	record[web: main record]
	{
	record[header]
	record[file1]
	...
	record[fileN]
	}

Header Record
=============
	
	record[header: header record]
	{
	fixed[16: ASCII 'DeadBeat_Ver_10']
	fixed[16: total size of header in ASCII]
	record[fileheader1]
	...
	record[fileheaderN]
	}

File Header
===========

	record[fileheader: header record for a file]
	{
	fixed[16: total size of record in ASCII == (16 + 16 + filepath.length) ]
	fixed[16: offset of file record in web file]
	variable[filepath: name of file in ASCII]
	}
	
File Record
===========

	record[filerecord: record of a compiled HTML or JS file]
	{
	fixed[16: total size of record in ASCII == (16+section1.length+...+sectionN.length)]
	record[section1]
	...
	record[sectionN]
	}

Section Record
==============
	record[section: record for an HTML or JS section]
	{
	fixed[16: total size of record in ASCII == (16+4+data.length)]
	fixed[4: type - ASCII numeric number ( 0==HTML, 1=JS ) ]
	variable[data: the data]
	}
	

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?