2010-10-06 修正解压缩代码
2010-11-06 增加C++版(C++Builder2010)代码
墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
5.9k累计阅读
5.9k平均单平台
已同步平台
CSDN
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄25年
2010-10-06 修正解压缩代码
2010-11-06 增加C++版(C++Builder2010)代码
在Delphi中使用ZLib的最新版本
在Delphi中使用ZLib的最新版本 Delphi自带了ZLib的移植版本(zlib.pas),但版本为1.0.4,而且必须要使用Borland自己编译生成的zlib.dcu 后继版本修改了大量的bug,并较大幅度地提升了性能
在C++ Builder中使用Delphi附带的Zlib封装类
论坛帖子:http://community.csdn.net/Expert/topic/3288/3288152.xml?temp=.2455866Delphi附带的zlib.pas包括了两个压缩和解压流的辅助类。使用起来相当方便,这使得很多C++ Builder的使用者都想要使用这个zlib.pas,偏偏borland没有在BCB中带上这个东西。也许可能是担心C++社群对BCB进行攻击吧。哈
Delphi ZLIB 使用方法 例子
zlib是提供资料压缩之用的函式库,由Jean-loup Gailly与Mark Adler所开发,初版0.9版在1995年5月1日发表。zlib使用DEFLATE算法,最初是为libpng函式库所写的,后来普遍为许多软件所使用。此函式库为自由软件,使用zlib授权。 zlib是用于资料压缩的函式库,由Jean-loup Gailly与Mark Adler所开发,是使用抽象化的DEFLATE压缩算法gzip文件压缩程序。初版0.9版在1995年5月1日发表,最初是为libpng函式库所写的,后来普遍为许多软件所使用。此函式库为自由软件,使用zlib授权。 截至2007年3月,zlib是包含在Coverity的美国国土安全部赞助者选择继续审查的开源项目。
ZLib的数据压缩和解压缩
Delphi的开发者可以使用ZLib单元中定义的TCompressionStream进行数据压缩,使用TDecompressionStream解压缩ZLib压缩后的数据。它们的定义如下:TCustomZlibStream = class(TStream)private FStrm: TStream; FStrmPos: Integer; FOnProgress: TN
zlib128.zip
zlib source code, version 1.2.8, zipfile format (678K, MD5 checksum 126f8676442ffbd97884eb4d6f32afb4):
解压Zip字符串(Delphi)
delphi环境下开发的针对gZip字符串解压锁,包含源代码和demo实例。
使用BCB对zlib进行源码编译
ZLib (BCB)DownloadDownload http://www.zlib.net/zlib-1.2.3.tar.gzProjectCreate new project (Library)Add (%SOURCE_HOME%/): All .c files except example.c and minigzip.
zlib1211源码及编译文件
提供zlib源码和编译后文件,包含zlib1211源码以及zlib.lib文件和zlib1.dll
使用ZLIB生成DLL文件,并进行有中文的ZIP文件压缩与解压操作!支持目录压与解!
借鉴ZLibWrap.DLL进行二次加工生成DLL文件,在C++builder中进行动态调用DLL,压缩与解压标准ZIP文件操作! 因为有中文操作需要多出一个参数,所以要使用两份,本来准备写类,用构造函数,但发现有点大才小用,就使用COPY一份代码了! DLL文件下载 http://download.csdn.net/detail/goodai007/4182207 DLL两个
手把手教你用LTspice仿真扬声器阻抗曲线(附Dayton/Focal型号库)
本文详细介绍了如何使用LTspice仿真软件构建高精度扬声器模型,包括获取Dayton/Focal等厂商的SPICE模型库、模型导入方法、阻抗测试电路搭建及仿真设置。通过手把手教学,帮助读者快速掌握扬声器阻抗曲线的仿真技术,提升音响系统设计效率。
支付宝H5支付唤醒协议全解析:从alipays://到动态orderSuffix的抓取与拼接
本文深入解析支付宝H5支付唤醒协议,从alipays://协议设计到动态orderSuffix参数的抓取与拼接,详细介绍了支付宝H5支付的底层机制。内容包括协议架构剖析、动态令牌生成与捕获、浏览器兼容性解决方案以及安全机制设计,为开发者提供全面的技术指南和实践建议。
java zlib1.dll,在Delphi中使用ZLib的最新版本
在Delphi中使用ZLib的最新版本ZLib(http://www.zlib.net)是现在使用最广泛的一套开源的通用无损压缩代码集了。它是LZ77 ((Lempel-Ziv 1977)的一个变种分支。它的代码是线程安全的,数据格式可以参见RFCs(Request for Comments) 1950 到1952(http://www.ietf.org/rfc/rfc1950.txt (zlib...
【自动驾驶规划】Lattice Planner
Lattice Planner简介 LatticePlanner算法属于一种局部轨迹规划器,输出轨迹将直接输入到控制器,由控制器完成对局部轨迹的跟踪控制。因此,Lattice Planner输出的轨迹是一条光滑无碰撞满足车辆运动学约束和速度约束的平稳安全的局部轨迹。Lattice Planner的输入端主要由三部分组成,感知及障碍物信息、参考线信息及定位信息。局部规划模块的输出是带有速度信息的一系列轨迹点组成的轨迹,其保证了车辆控制器在车辆跟踪控制过程中的平稳性和安全性。 局部规划模块的输出是带有速
delphi 压缩ZLib
system.ZLib http://docwiki.embarcadero.com/CodeExamples/Berlin/en/ZLibCompressDecompress_(Delphi) 还不如万老师的例子正确,官方的例子是 http://www.cnblogs.com/del/archive/2008/01/01/1022539.html System.ZLib.TZCompre...
【Bluetooth|蓝牙开发】三、一篇文章,带你总览蓝牙协议
1、开篇词 2、蓝牙开发入门 3、蓝牙协议栈总览 4、蓝牙协议栈——物理层 5、蓝牙协议栈——链路层 6、蓝牙协议栈——传输层 7、蓝牙协议栈——L2CAP协议 8、蓝牙协议栈——ATT协议 9、蓝牙协议栈——GATT协议 10、蓝牙通信流程分析 11、蓝牙协议栈——Bluez交叉编译 12、蓝牙调试工具汇总
从数字后端角度谈谈occ电路(一)
摘要:本文介绍了芯片测试中OCC(On-Chip Clock Control)电路的设计与应用。随着工艺进步,芯片制造面临Stuck-at、Bridging和Delay等故障类型,需要不同时钟频率进行测试。OCC电路通过Clock Selection、Clock Chopping Control和Clock Gating三个模块,实现ATE时钟与PLL时钟的切换控制,支持慢速时钟检测Stuck-at故障和快速时钟检测Delay故障。文章详细解析了OCC电路结构及各模块功能,包括同步单元、移位寄存器等关键组件
在C++BUILDER中应用ZLIB
#include void __fastcall TFrmMain::BtnCompressClick(TObject *Sender) // 压缩 { TMemoryStream *pMemsrc=new TMemoryStream(); pMemsrc->Loa
PCL 八叉树的使用
八叉树(Octree)是一种空间划分的数据结构,广泛应用于三维点云的处理和分析。八叉树通过将空间递归地划分为八个子区域,可以有效地组织和索引三维点数据,提升点云的查询、降采样和配准等操作的效率。
Delphi使用Zlib
uses zlib; //将Src使用Zlib压缩后存入Dst当中 procedure PackStream(const Src:TStream; Dst:TStream); var CompStream: TCompressionStream; begin //增加“断言”以防止输入参数有误 Assert(Src <> Nil); Assert(Dst <&...
Unity3D实现项目限制功能(使用次数限制和时间限制)
大家好,我是心疼你的一切,不定时更新Unity开发技巧,觉得有用记得一键三连哦。在软件开发的时候,可能会遇到程序的使用次数限制,以及时间的限制,下面就写一下这两种方法是新建注册表,增加键值对,修改键值,完成对程序的控制提示:以下是本篇文章正文内容,下面案例可供参考以上就是讲了两种限制方法不定时更新Unity开发技巧,觉得有用记得一键三连哦。
Linux内核驱动模型--PCIe(PCI Express)驱动
本文系统介绍了Linux内核中PCIe驱动的设计与实现。首先从架构定位入手,指出PCIe驱动基于PCI子系统扩展支持高速、低功耗特性。核心数据结构struct pci_driver包含设备匹配表id_table、生命周期函数probe/remove等关键组件。文章详细解析了驱动与设备的绑定流程、资源管理机制,并重点阐述了MSI-X中断、电源管理、热插拔和多队列等高级特性实现方案。最后提供了lspci、dmesg等调试工具的使用方法,总结了PCIe驱动在支持高性能设备中的关键作用。全文通过架构设计、核心结构、
java gzip delphi_Delphi 使用 ZLib 压缩和解压 GZip
uses System.ZLib;constZLIB_GZIP_WINDOWBITS = 31;ZLIB_DEFLATE_WINDOWBITS = 15;typeTZLibCompressionLevel = TZCompressionLevel;/// /// 使用 ZLib 压缩流/// /// 要压缩的数据流/// 压缩后的数据流/// 压缩级别/// 是否使用 GZip 压缩算法pr...
Camera2Demo
在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作
Delphi使用zlib来压缩文件
使用时,需要Zlib.pas和 Zlibconst.pas两个单元文件,这两个文件保存在 Delphi 5.0安装光盘上 InfoExtrasZlib目录下,此外,在 InfoExtrasZlibObj目录中还保存了 Zlib.pas单元引用的 Obj文件,把这个目录拷贝到delphi的lib下,即可。可以适当的改动比如增加目录压缩和分文件压缩,其实就是在文件流前面增加一部分描述结构就是,不多说。...
ssm框架搭建
这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
6500
430

被折叠的 条评论
为什么被折叠?



