template "NTFS Data Runs"
//template by Jens Kirschner
//X-Ways Software Technology AG
//X-Ways Software Technology AG
description "To be applied to beginning of data runs"
applies_to disk
applies_to disk
begin
{
uint_flex "3,2,1,0" "ClusterCountSize"
move -4
uint_flex "7,6,5,4" "ClusterStartSize"
move -3
uint_flex "3,2,1,0" "ClusterCountSize"
move -4
uint_flex "7,6,5,4" "ClusterStartSize"
move -3
ifequal ClusterCountSize 0
ExitLoop
endif
ExitLoop
endif
ifGreater ClusterCountSize 4
section "Unsupported value in Data Run"
ExitLoop
endif
section "Unsupported value in Data Run"
ExitLoop
endif
ifGreater ClusterStartSize 4
section "Unsupported value in Data Run"
ExitLoop
endif
section "Unsupported value in Data Run"
ExitLoop
endif
ifequal ClusterCountSize 1
int8 ClusterCount
endif
int8 ClusterCount
endif
ifequal ClusterCountSize 2
int16 ClusterCount
endif
int16 ClusterCount
endif
ifequal ClusterCountSize 3
int24 ClusterCount
endif
int24 ClusterCount
endif
ifequal ClusterCountSize 4
int32 ClusterCount
endif
int32 ClusterCount
endif
ifequal ClusterStartSize 0
section "(sparse or compressed)"
endsection
endif
ifequal ClusterStartSize 1
int8 ClusterStart
endif
int8 ClusterStart
endif
ifequal ClusterStartSize 2
int16 ClusterStart
endif
int16 ClusterStart
endif
ifequal ClusterStartSize 3
int24 ClusterStart
endif
int24 ClusterStart
endif
ifequal ClusterStartSize 4
int32 ClusterStart
endif
int32 ClusterStart
endif
endsection
}[150] //arbitrary end to avoid infinite loops
end
转载于:https://blog.51cto.com/wuxiaoming0222/225752