代码拉取完成,页面将自动刷新
#include "codec.h"
#include "log.h"
#include <string.h>
using namespace std;
/* MIJD is a proprietary codec...
* it looks like it contains a couple of jpegs,
* at offset 28 is the relative begin of the first image
* at 32 the length of the first image
* at 34 and 36 width and height of the image
* at 44 relative begin of the second image
* at 48 length of the seocnd image
* at 52 - 54 width and height of the second image.
*
*/
Match Codec::mijdMatch(const unsigned char *start, int maxlength) {
Match match;
if(!strncmp((char *)start, "mijd", 4)) {
uint32_t off = *(uint32_t *)(start + 44);
uint32_t length = *(uint32_t *)(start + 48);
match.length = off + length;
match.chances = 1e30;
return match;
}
uint32_t word = *(uint32_t *)start;
if(word == 0x3030f800) {
match.length = 250;
match.chances = 1e30;
return match;
}
return match;
}
Match Codec::mijdSearch(const unsigned char *start, int maxlength) {
Match match;
const unsigned char *end = start + maxlength - 8;
const unsigned char *current = start;
while(current < end) {
uint32_t word = *(uint32_t *)start;
if(!strncmp((char *)current, "mijd", 4) || word == 0x3030f800) {
match.offset = current - start;
match.chances = 1e30;
return match;
}
current++;
}
return match;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。