Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
huffdecode.m
Package: JPEG-matlab.rar [view]
Upload User: mgf822
Upload Date: 2022-06-06
Package Size: 51k
Code Size: 1k
Category:
Compress-Decompress algrithms
Development Platform:
Matlab
- function vector=huffdecode(zipped,info,image)
- % if ~isa(zipped,'uint8')
- % error('input argument must be a uint8 vector');
- %
- % end
- len=length(zipped);
- string=repmat(uint8(0),1,len.*8);
- bitindex=1:8;
- for index=1:len
- string(bitindex+8.*(index-1))=uint8(bitget(zipped(index),bitindex));
- end
- string=logical(string(:));
- len=length(string);
- string((len-info.pad+1):end)=[];
- len=length(string);
- weights=2.^(0:51);
- vector=repmat(uint8(0),1,info.length);
- vectorindex=1;
- codeindex=1;
- code=0;
- for index=1:len
- code=bitset(code,codeindex,string(index));
- codeindex=codeindex+1;
- byte=decode(bitset(code,codeindex),info);
- if byte>0
- vector(vectorindex)=byte-1;
- codeindex=1;
- code=0;
- vectorindex=vectorindex+1;
- end
- end
- vector=reshape(vector,info.rows,info.cols);